diff --git a/reaction/cgame/cg_consolecmds.c b/reaction/cgame/cg_consolecmds.c index 7ede7ce4..e151cd36 100644 --- a/reaction/cgame/cg_consolecmds.c +++ b/reaction/cgame/cg_consolecmds.c @@ -115,6 +115,11 @@ static void CG_Reload_f (void) { return; } + //Elder: don't allow reloading until the weapon is free + //Don't cut-off here because we want to check for fast-reloads + //if (cg.snap->ps.weaponTime > 0) + //return; + //Elder: added to prevent bandaging while reloading if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) { CG_Printf("You'll get to your weapon when you are finished bandaging!\n"); diff --git a/reaction/cgame/cg_event.c b/reaction/cgame/cg_event.c index 63178dc8..66a705fa 100644 --- a/reaction/cgame/cg_event.c +++ b/reaction/cgame/cg_event.c @@ -765,6 +765,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { break; case EV_CHANGE_WEAPON: DEBUGNAME("EV_CHANGE_WEAPON"); + //Elder: TODO: change to appropriate weapon "in" sound trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound ); //Elder: removed //CG_rxn_zoom(0); diff --git a/reaction/cgame/cg_local.h b/reaction/cgame/cg_local.h index bfdff756..7e8e8eb4 100644 --- a/reaction/cgame/cg_local.h +++ b/reaction/cgame/cg_local.h @@ -274,13 +274,14 @@ typedef struct { int scoreFlags; int powerUps; int accuracy; + //Elder: no more of these int impressiveCount; int excellentCount; int guantletCount; int defendCount; int assistCount; int captures; - qboolean perfect; + qboolean perfect; int team; } score_t; diff --git a/reaction/cgame/cg_servercmds.c b/reaction/cgame/cg_servercmds.c index 3d6a8ab3..2fcdc3f2 100644 --- a/reaction/cgame/cg_servercmds.c +++ b/reaction/cgame/cg_servercmds.c @@ -56,7 +56,8 @@ static void CG_ParseScores( void ) { memset( cg.scores, 0, sizeof( cg.scores ) ); for ( i = 0 ; i < cg.numScores ; i++ ) { - // + //Elder: Leave as-is ... sent zeros by server + //CG_Printf("client: %d\n", cg.scores[i].client); cg.scores[i].client = atoi( CG_Argv( i * 14 + 4 ) ); cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) ); cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) ); @@ -64,6 +65,7 @@ static void CG_ParseScores( void ) { cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) ); powerups = atoi( CG_Argv( i * 14 + 9 ) ); cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10)); + //Elder: these should be zero cg.scores[i].impressiveCount = atoi(CG_Argv(i * 14 + 11)); cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12)); cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13)); diff --git a/reaction/cgame/cg_weapons.c b/reaction/cgame/cg_weapons.c index e20dcc4e..5f4deea9 100644 --- a/reaction/cgame/cg_weapons.c +++ b/reaction/cgame/cg_weapons.c @@ -1596,6 +1596,11 @@ void CG_NextWeapon_f( void ) { return; } + //Elder: in the middle of firing, reloading or weapon-switching + if (cg.snap->ps.weaponTime > 0) { + return; + } + //Elder: added //cg.zoomed = qfalse; //cg.zoomLevel = 0; @@ -1643,6 +1648,11 @@ void CG_PrevWeapon_f( void ) { return; } + //Elder: in the middle of firing, reloading or weapon-switching + if (cg.snap->ps.weaponTime > 0) { + return; + } + //Elder: added //cg.zoomed = qfalse; //cg.zoomLevel = 0; @@ -2322,12 +2332,15 @@ Perform the same traces the server did to locate the hit splashes (FIXME: ranom seed isn't synce anymore) ================ */ -static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum,qboolean ism3 ) { +static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum, int shotType ) { int i; float r, u; vec3_t end; vec3_t forward, right, up; + int count; + int hc_multipler; + // derive the right and up vectors from the forward vector, because // the client won't have any other information VectorNormalize2( origin2, forward ); @@ -2335,16 +2348,34 @@ static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum,qb CrossProduct( forward, right, up ); // generate the "random" spread pattern - for ( i = 0 ; i < DEFAULT_SHOTGUN_COUNT ; i++ ) { - if (ism3) + + //Elder: added + if (shotType == WP_M3) + count = DEFAULT_M3_COUNT; + else if (shotType == WP_HANDCANNON) { + count = DEFAULT_HANDCANNON_COUNT; + hc_multipler = 4; + } + else { + count = DEFAULT_HANDCANNON_COUNT; + hc_multipler = 5; + } + + + for ( i = 0 ; i < count ; i++ ) { + if (shotType == WP_M3) { - r = crandom() * DEFAULT_SHOTGUN_SPREAD * 16; - u = crandom() * DEFAULT_SHOTGUN_SPREAD * 16; + r = crandom() * DEFAULT_M3_HSPREAD * 16; + u = crandom() * DEFAULT_M3_VSPREAD * 16; + //r = crandom() * DEFAULT_SHOTGUN_SPREAD * 16; + //u = crandom() * DEFAULT_SHOTGUN_SPREAD * 16; } else { - r = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4; - u = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4; + r = crandom() * DEFAULT_SHOTGUN_HSPREAD * 16 * 4; + u = crandom() * DEFAULT_SHOTGUN_VSPREAD * 16 * hc_multipler; +// r = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4; +// u = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4; } VectorMA( origin, 8192 * 16, forward, end); VectorMA (end, r, right, end); VectorMA (end, u, up, end); @@ -2376,15 +2407,16 @@ void CG_ShotgunFire( entityState_t *es, qboolean ism3) { CG_SmokePuff( v, up, 32, 1, 1, 1, 0.33f, 900, cg.time, 0, LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader ); } } + //Elder: note param changes if (ism3) { - CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3); + CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, WP_M3); } else { - CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3); + CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, WP_HANDCANNON); es->origin2[1] += 5; - CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3); + CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, -1 ); } }