From 17ea4d827ad8fa1462447d59f490a007ba706d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Mon, 29 Nov 2021 23:23:26 +0700 Subject: Use more efficient PRNG --- src/Person.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Person.cpp') diff --git a/src/Person.cpp b/src/Person.cpp index 888ea8f..dca3bbb 100644 --- a/src/Person.cpp +++ b/src/Person.cpp @@ -22,7 +22,6 @@ #include #include "Person.h" -#include "Support.h" #include "config.h" #include "misc.h" @@ -212,7 +211,7 @@ void Person::DoAnimations(int who) || targetanimation == walkanim) && (targetframe == 0 || targetframe == 8) && who == 0) { auto soundsrc = playercoords - camera.position; - playSound(gSourceID[footstepsound + abs(Random()) % 5], + playSound(gSourceID[footstepsound + randUint(5)], soundsrc.x, soundsrc.y, soundsrc.z); } @@ -574,7 +573,7 @@ void Person::DoAnimationslite(int who) || targetanimation == walkanim) && (targetframe == 0 || targetframe == 8)) { auto soundsrc = playercoords - camera.position; - playSound(gSourceID[footstepsound + abs(Random()) % 5], + playSound(gSourceID[footstepsound + randUint(5)], soundsrc.x, soundsrc.y, soundsrc.z); } -- cgit v1.2.3