seperate rand instances for each thread
[carveJwlIkooP6JGAAIwe30JlM.git] / world_audio.c
index 1e902fad724f3581941a999b25d35dc159cb376e..0ecb6eb5d0c03443ff8ceeccc3cf778c0690d9c3 100644 (file)
@@ -30,11 +30,10 @@ static void world_fadeout_audio( world_instance *world )
  * Trace out a random point, near the player to try and determine water areas
  */
 static 
-enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output)
-{
-   v3f chance = { (vg_randf64()-0.5f) * 30.0f, 
-                  8.0f,
-                  (vg_randf64()-0.5f) * 30.0f };
+enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output){
+   v3f chance = { (vg_randf64(&vg.rand)-0.5f) * 30.0f, 
+                  8,
+                  (vg_randf64(&vg.rand)-0.5f) * 30.0f };
    
    v3f pos;
    v3_add( chance, origin, pos );