diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 12:58:55 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:23 +0000 |
commit | 52da147a0f0f47b8d4d0878a64111c0bfb1b59fc (patch) | |
tree | 516d457271a089525a8602877e0db1d15134435d /src/game/g_buildable.c | |
parent | a1f504b8679292008cbf6363e2df7e03d47f353a (diff) |
Merge most of the CalculateBuildPoints loops
It may be possible to do this further but as it is I've simplified and
efficientised the code a good deal.
Also some tiny irrelevant cleanups
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 11d7ea2a..5d40cd15 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2465,12 +2465,6 @@ think function */ void HSpawn_Disappear( gentity_t *self ) { - vec3_t dir; - - // we don't have a valid direction, so just point straight up - dir[ 0 ] = dir[ 1 ] = 0; - dir[ 2 ] = 1; - self->s.eFlags |= EF_NODRAW; //don't draw the model once its destroyed self->timestamp = level.time; G_QueueBuildPoints( self ); @@ -2868,7 +2862,8 @@ static gentity_t *G_FindBuildable( buildable_t buildable ) int i; gentity_t *ent; - for ( i = 1, ent = g_entities + i; i < level.num_entities; i++, ent++ ) + for( i = MAX_CLIENTS, ent = g_entities + i; + i < level.num_entities; i++, ent++ ) { if( ent->s.eType != ET_BUILDABLE ) continue; |