summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-02-14 04:47:52 +0000
committerTim Angus <tim@ngus.net>2003-02-14 04:47:52 +0000
commitb9e28692c2f13c07974fb389d92d805234c8893c (patch)
tree7bed3bd37bb79962450c9a1edb8bb8bb2c9ee350 /src/cgame/cg_ents.c
parent21897ddb12f534b6f78521815ea91c0e30d81e1c (diff)
* Model precaching moved entirely to the client side
* Armour skins and battlesuit/helmet models now used
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r--src/cgame/cg_ents.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index cea7e935..6283e7ff 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -963,6 +963,7 @@ void CG_AddPacketEntities( void )
cg.ep.numHumanBuildables = 0;
cg.ep.numAlienClients = 0;
cg.ep.numHumanClients = 0;
+ cg.nearbyCorpse = qfalse;
for( num = 0 ; num < cg.snap->numEntities ; num++ )
{
@@ -998,6 +999,19 @@ void CG_AddPacketEntities( void )
cg.ep.numHumanClients++;
}
}
+ else if( cent->currentState.eType == ET_CORPSE )
+ {
+#define INFEST_RADIUS 64.0f
+
+ if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS &&
+ Distance( cg.refdef.vieworg, cent->lerpOrigin ) < INFEST_RADIUS )
+ {
+ if( cent->currentState.eType == ET_CORPSE &&
+ ( cent->currentState.powerups == cg.predictedPlayerState.clientNum ||
+ cent->currentState.powerups == 65535 ) )
+ cg.nearbyCorpse = qtrue;
+ }
+ }
}
//Com_Printf( "%d %d\n", cgIP.numAlienClients, cgIP.numHumanClients );