From 988e4b435bb8666afb18fadc7dfa472b1332c93b Mon Sep 17 00:00:00 2001 From: "Tony J. White" Date: Tue, 10 Apr 2007 14:40:22 +0000 Subject: * g_layoutAuto was not selecting a random layout properly --- src/game/g_buildable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ); -- cgit