diff options
author | Tony J. White <tjw@tjw.org> | 2007-04-10 14:40:22 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2007-04-10 14:40:22 +0000 |
commit | 988e4b435bb8666afb18fadc7dfa472b1332c93b (patch) | |
tree | 8a37816d9ca7fa13a38170babf4e5235a30e7b47 | |
parent | 1dc0d5c7eae46c086ca04db8ba894c88d2f8467f (diff) |
* g_layoutAuto was not selecting a random layout properly
-rw-r--r-- | src/game/g_buildable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index aeac1be6..cc5b4d37 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -3593,7 +3593,7 @@ void G_LayoutSelect( void ) "found, using map default\n" ); return; } - layoutNum = ( rand( ) & ( cnt - 1 ) ) + 1; + layoutNum = ( rand( ) % cnt ) + 1; cnt = 0; Q_strncpyz( layouts2, layouts, sizeof( layouts2 ) ); |