summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2011-08-14 21:16:09 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:13 +0000
commitd432478aad0b3f0e9254762fc41471212c315652 (patch)
tree8351e44465f156b6cfee622098cdde955b531c72 /src/game/g_active.c
parentd34172288e4d5313a6c97ea56987315b67b022d0 (diff)
* (bug 3781) Improve randomness in some cases (Lakitu7 made me do it)
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 87cb7e94..aad05967 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -129,7 +129,7 @@ void P_WorldEffects( gentity_t *ent )
// play a gurp sound instead of a normal pain sound
if( ent->health <= ent->damage )
G_Sound( ent, CHAN_VOICE, G_SoundIndex( "*drown.wav" ) );
- else if( rand( ) & 1 )
+ else if( rand( ) < RAND_MAX / 2 + 1 )
G_Sound( ent, CHAN_VOICE, G_SoundIndex( "sound/player/gurp1.wav" ) );
else
G_Sound( ent, CHAN_VOICE, G_SoundIndex( "sound/player/gurp2.wav" ) );