summaryrefslogtreecommitdiff
path: root/src/cgame/cg_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_buildable.c')
-rw-r--r--src/cgame/cg_buildable.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index eed8e0e..68fc4c2 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -1211,7 +1211,6 @@ void CG_Buildable( centity_t *cent )
buildableTeam_t team = BG_FindTeamForBuildable( es->modelindex );
float scale;
int health;
- float healthScale;
//must be before EF_NODRAW check
if( team == BIT_ALIENS )
@@ -1397,9 +1396,8 @@ void CG_Buildable( centity_t *cent )
}
health = es->generic1 & B_HEALTH_MASK;
- healthScale = (float)health / B_HEALTH_MASK;
- if( healthScale < cent->lastBuildableHealthScale && ( es->generic1 & B_SPAWNED_TOGGLEBIT ) )
+ if( health < cent->lastBuildableHealth && ( es->generic1 & B_SPAWNED_TOGGLEBIT ) )
{
if( cent->lastBuildableDamageSoundTime + BUILDABLE_SOUND_PERIOD < cg.time )
{
@@ -1415,7 +1413,7 @@ void CG_Buildable( centity_t *cent )
}
}
- cent->lastBuildableHealthScale = healthScale;
+ cent->lastBuildableHealth = health;
//smoke etc for damaged buildables
CG_BuildableParticleEffects( cent );