diff options
-rw-r--r-- | src/cgame/cg_buildable.c | 2 | ||||
-rw-r--r-- | src/game/g_admin.c | 2 | ||||
-rw-r--r-- | src/game/g_buildable.c | 8 | ||||
-rw-r--r-- | src/game/g_combat.c | 5 | ||||
-rw-r--r-- | src/game/g_weapon.c | 43 |
5 files changed, 11 insertions, 49 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 207c6b49..d2bbe05b 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -1233,7 +1233,6 @@ void CG_Buildable( centity_t *cent ) team_t team = BG_Buildable( es->modelindex )->team; float scale; int health; - float healthScale; //must be before EF_NODRAW check if( team == TEAM_ALIENS ) @@ -1450,7 +1449,6 @@ void CG_Buildable( centity_t *cent ) } health = es->generic1; - healthScale = (float)health / BG_Buildable( es->modelindex )->health; if( health < cent->lastBuildableHealth && ( es->eFlags & EF_B_SPAWNED ) ) diff --git a/src/game/g_admin.c b/src/game/g_admin.c index ef607fe0..dbbde2f7 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -482,7 +482,6 @@ static void admin_writeconfig( void ) { fileHandle_t f; int t; - char levels[ MAX_STRING_CHARS ] = {""}; g_admin_admin_t *a; g_admin_level_t *l; g_admin_ban_t *b; @@ -555,7 +554,6 @@ static void admin_writeconfig( void ) } for( c = g_admin_commands; c; c = c->next ) { - levels[ 0 ] = '\0'; trap_FS_Write( "[command]\n", 10, f ); trap_FS_Write( "command = ", 10, f ); admin_writeconfig_string( c->command, f ); diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 0955dd19..f0016765 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -932,12 +932,8 @@ Think function for Alien Overmind void AOvermind_Think( gentity_t *self ) { vec3_t range = { OVERMIND_ATTACK_RANGE, OVERMIND_ATTACK_RANGE, OVERMIND_ATTACK_RANGE }; - vec3_t mins, maxs; int i; - VectorAdd( self->s.origin, range, maxs ); - VectorSubtract( self->s.origin, range, mins ); - if( self->spawned && ( self->health > 0 ) ) { //do some damage @@ -947,7 +943,7 @@ void AOvermind_Think( gentity_t *self ) self->timestamp = level.time; G_SetBuildableAnim( self, BANIM_ATTACK1, qfalse ); } - + // just in case an egg finishes building after we tell overmind to stfu if( level.numAlienSpawns > 0 ) level.overmindMuted = qfalse; @@ -3370,7 +3366,6 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance qboolean invert; int contents; playerState_t *ps = &ent->client->ps; - int buildPoints; // Stop all buildables from interacting with traces G_SetBuildableLinkState( qfalse ); @@ -3395,7 +3390,6 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance reason = IBE_NORMAL; contents = trap_PointContents( entity_origin, -1 ); - buildPoints = BG_Buildable( buildable )->buildPoints; if( ( tempReason = G_SufficientBPAvailable( buildable, origin ) ) != IBE_NONE ) reason = tempReason; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 29b635dd..46657322 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -238,7 +238,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int int killer; int i; char *killerName, *obit; - float totalDamage = 0.0f; if( self->client->ps.pm_type == PM_DEAD ) return; @@ -319,7 +318,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int } // give credits for killing this player - totalDamage = G_RewardAttackers( self ); + G_RewardAttackers( self ); ScoreboardMessage( self ); // show scores @@ -910,7 +909,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, { gclient_t *client; int take; - int save; int asave = 0; int knockback; @@ -1078,7 +1076,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, } take = damage; - save = 0; // add to the damage inflicted on a player this frame // the total will be turned into screen blends and view angle kicks diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 06b8ca03..4465efa9 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -505,11 +505,7 @@ LOCKBLOB void lockBlobLauncherFire( gentity_t *ent ) { - gentity_t *m; - - m = fire_lockblob( ent, muzzle, forward ); - -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + fire_lockblob( ent, muzzle, forward ); } /* @@ -540,11 +536,7 @@ BLASTER PISTOL void blasterFire( gentity_t *ent ) { - gentity_t *m; - - m = fire_blaster( ent, muzzle, forward ); - -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + fire_blaster( ent, muzzle, forward ); } /* @@ -557,11 +549,7 @@ PULSE RIFLE void pulseRifleFire( gentity_t *ent ) { - gentity_t *m; - - m = fire_pulseRifle( ent, muzzle, forward ); - -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + fire_pulseRifle( ent, muzzle, forward ); } /* @@ -595,9 +583,7 @@ GRENADE void throwGrenade( gentity_t *ent ) { - gentity_t *m; - - m = launch_grenade( ent, muzzle, forward ); + launch_grenade( ent, muzzle, forward ); } /* @@ -707,13 +693,11 @@ LCChargeFire */ void LCChargeFire( gentity_t *ent, qboolean secondary ) { - gentity_t *m; - if( secondary && ent->client->ps.stats[ STAT_MISC ] <= 0 ) - m = fire_luciferCannon( ent, muzzle, forward, LCANNON_SECONDARY_DAMAGE, + fire_luciferCannon( ent, muzzle, forward, LCANNON_SECONDARY_DAMAGE, LCANNON_SECONDARY_RADIUS, LCANNON_SECONDARY_SPEED ); else - m = fire_luciferCannon( ent, muzzle, forward, + fire_luciferCannon( ent, muzzle, forward, ent->client->ps.stats[ STAT_MISC ] * LCANNON_DAMAGE / LCANNON_CHARGE_TIME_MAX, LCANNON_RADIUS, LCANNON_SPEED ); @@ -873,11 +857,7 @@ void buildFire( gentity_t *ent, dynMenu_t menu ) void slowBlobFire( gentity_t *ent ) { - gentity_t *m; - - m = fire_slowBlob( ent, muzzle, forward ); - -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + fire_slowBlob( ent, muzzle, forward ); } @@ -1335,11 +1315,7 @@ qboolean CheckPounceAttack( gentity_t *ent ) void bounceBallFire( gentity_t *ent ) { - gentity_t *m; - - m = fire_bounceBall( ent, muzzle, forward ); - -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + fire_bounceBall( ent, muzzle, forward ); } @@ -1360,7 +1336,7 @@ void G_ChargeAttack( gentity_t *ent, gentity_t *victim ) { int damage; int i; - vec3_t forward, normal; + vec3_t forward; if( ent->client->ps.stats[ STAT_MISC ] <= 0 || !( ent->client->ps.stats[ STAT_STATE ] & SS_CHARGING ) || @@ -1369,7 +1345,6 @@ void G_ChargeAttack( gentity_t *ent, gentity_t *victim ) VectorSubtract( victim->s.origin, ent->s.origin, forward ); VectorNormalize( forward ); - VectorNegate( forward, normal ); if( !victim->takedamage ) return; |