summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-19 18:02:59 +0000
committerTim Angus <tim@ngus.net>2003-08-19 18:02:59 +0000
commit07d3e4b4e8caf70aadc7eb3a5135169bf070d3c9 (patch)
treef10d508c329aa52e685bd69fbaae67189fd6640a
parent653d19589c6c466292f396a9d298bc73fe0ea453 (diff)
* Fixed spawn kick for aliens
* Creep grows in accordance to buildTime * Construction animation doesn't start until the end of buildTime
-rw-r--r--src/cgame/cg_buildable.c15
-rw-r--r--src/game/g_client.c2
2 files changed, 10 insertions, 7 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index d1732f38..4b7f4a2d 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -53,14 +53,14 @@ static void CG_Creep( centity_t *cent )
float length;
trace_t tr, tr2;
vec3_t temp, origin, p1, p2;
- int creepSize = BG_FindCreepSizeForBuildable( cent->currentState.clientNum );
+ int scaleUpTime = BG_FindBuildTimeForBuildable( cent->currentState.modelindex );
//should the creep be growing or receding?
if( cent->miscTime >= 0 )
{
msec = cg.time - cent->miscTime;
- if( msec >= 0 && msec < CREEP_SCALEUP_TIME )
- frac = (float)msec / CREEP_SCALEUP_TIME;
+ if( msec >= 0 && msec < scaleUpTime )
+ frac = (float)msec / scaleUpTime;
else
frac = 1.0f;
}
@@ -834,9 +834,12 @@ void CG_Buildable( centity_t *cent )
if( team == BIT_ALIENS )
{
CG_Creep( cent );
-
- //run animations
- CG_BuildableAnimation( cent, &ent.oldframe, &ent.frame, &ent.backlerp );
+
+ if( es->generic1 & B_SPAWNED_TOGGLEBIT )
+ {
+ //run animations
+ CG_BuildableAnimation( cent, &ent.oldframe, &ent.frame, &ent.backlerp );
+ }
}
else if( team == BIT_HUMANS )
{
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 0d40f38c..5b582458 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1459,7 +1459,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
if( client->sess.sessionTeam != TEAM_SPECTATOR &&
client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
- if( !spawn && spawnPoint->s.origin2[ 2 ] > 0.0f )
+ if( ent != spawn && spawnPoint->s.origin2[ 2 ] > 0.0f )
{
vec3_t forward, dir;