so I broke my shotgun :/
I merged the unlagged code into mine since unlagged is GPLed now...
I only had one hiccup in cg_draw.c and it threw me for a loop. I left an extra { in the code
anyway unlagged makes this change in the CG_ShotgunPattern
//unlagged - attack prediction
// made this non-static for access from cg_unlagged.c
void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int seed, int otherEntNum ) {
int i;
float r, u;
vec3_t end;
vec3_t forward, right, up;
That's fine because when cg_delag is 0 the shotgun works great. but when cg_delag is 1
it doesn't draw a pattern at all.
I found this part in cg_unlagged.c
// was it a shotgun attack?
else if ( ent->weapon == WP_SHOTGUN ) {
// do we have it on for the shotgun?
if ( cg_delag.integer & 1 || cg_delag.integer & 4 ) {
int contents;
vec3_t endPoint, v;
// do everything like the server does
SnapVector( muzzlePoint );
VectorScale( forward, 4096, endPoint );
SnapVector( endPoint );
VectorSubtract( endPoint, muzzlePoint, v );
VectorNormalize( v );
VectorScale( v, 32, v );
VectorAdd( muzzlePoint, v, v );
if ( cgs.glconfig.hardwareType != GLHW_RAGEPRO ) {
// ragepro can't alpha fade, so don't even bother with smoke
vec3_t up;
contents = trap_CM_PointContents( muzzlePoint, 0 );
if ( !( contents & CONTENTS_WATER ) ) {
VectorSet( up, 0, 0, 8 );
CG_SmokePuff( v, up, 32, 1, 1, 1, 0.33f, 900, cg.time, 0, LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader );
}
}
// do the shotgun pellets
CG_ShotgunPattern( muzzlePoint, endPoint, cg.oldTime % 256, cg.predictedPlayerState.clientNum );
//Com_Printf( "Predicted shotgun pattern\n" );
}
}
and at the bottom the //do the shotgun pellets doesn't match what is in the CG_ShotgunFire
Bleh