diff options
author | Tim Angus <tim@ngus.net> | 2004-05-01 02:03:55 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-05-01 02:03:55 +0000 |
commit | 127ade46d41e599b55d4359eae5eebf69f638aee (patch) | |
tree | 6e154fde3fc1dae0c167aa1cfc96181f5e3862f8 /src/game/g_main.c | |
parent | 36ceed63fed29968e418ac4d4bd60d1c1a14bec8 (diff) |
* A plethora of assorted fiddles
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r-- | src/game/g_main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index c5670f32..c5546168 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -697,7 +697,15 @@ Return tha length of a spawn queue */ int G_GetSpawnQueueLength( spawnQueue_t *sq ) { - return ( sq->back - sq->front + 1 ) % MAX_CLIENTS; + int length = sq->back - sq->front + 1; + + while( length < 0 ) + length += MAX_CLIENTS; + + while( length >= MAX_CLIENTS ) + length -= MAX_CLIENTS; + + return length; } /* |