From 1dac12d236353ad0e77a954ab4ca738f5c73aa5e Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Tue, 5 Aug 2003 01:06:57 +0000 Subject: * Added sanity checks to spawn code to (hopefully) prevent that "really bizarre bug" --- src/game/g_client.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game/g_client.c') diff --git a/src/game/g_client.c b/src/game/g_client.c index 8e3fdaf1..a4d2684a 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -281,6 +281,9 @@ gentity_t *SelectAlienSpawnPoint( void ) trace_t tr; float displacement; + if( level.numAlienSpawns <= 0 ) + return NULL; + VectorSet( mins, -MAX_ALIEN_BBOX, -MAX_ALIEN_BBOX, -MAX_ALIEN_BBOX ); VectorSet( maxs, MAX_ALIEN_BBOX, MAX_ALIEN_BBOX, MAX_ALIEN_BBOX ); @@ -340,6 +343,9 @@ gentity_t *SelectHumanSpawnPoint( void ) gentity_t *ent; trace_t tr; + if( level.numHumanSpawns <= 0 ) + return NULL; + BG_FindBBoxForClass( PCL_H_BASE, mins, maxs, NULL, NULL, NULL ); count = 0; -- cgit