changed lhrandom to use the full RAND_MAX limit (more random, after all the low bits...
[xonotic/darkplaces.git] / pr_cmds.c
index 6e021a7..ddf9d45 100644 (file)
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -594,11 +594,7 @@ random()
 */
 void PF_random (void)
 {
-       float           num;
-
-       num = (rand ()&0x7fff) / ((float)0x7fff);
-
-       G_FLOAT(OFS_RETURN) = num;
+       G_FLOAT(OFS_RETURN) = lhrandom(0, 1);
 }
 
 /*