From 52da147a0f0f47b8d4d0878a64111c0bfb1b59fc Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 3 Oct 2009 12:58:55 +0000 Subject: 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 --- src/game/g_buildable.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/game/g_buildable.c') 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; -- cgit