summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-05 01:06:57 +0000
committerTim Angus <tim@ngus.net>2003-08-05 01:06:57 +0000
commit1dac12d236353ad0e77a954ab4ca738f5c73aa5e (patch)
treeea7c7a7b4350ab697e6888ae8853b9c44ae7f15d /src/game/g_client.c
parentf597b0dc226514273f5333c01f25a7ed808c89d3 (diff)
* Added sanity checks to spawn code to (hopefully) prevent that "really bizarre bug"
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c6
1 files changed, 6 insertions, 0 deletions
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;