aboutsummaryrefslogtreecommitdiff
path: root/src/GameDraw.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-11-29 23:23:26 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-11-29 23:23:26 +0700
commit17ea4d827ad8fa1462447d59f490a007ba706d20 (patch)
tree4d4c8952a6de825be79427568621cafb66c037ab /src/GameDraw.cpp
parent4c7e7136f125ceb5186fdcc0463a6c10990d1111 (diff)
downloadblackshades-17ea4d827ad8fa1462447d59f490a007ba706d20.tar.gz
Use more efficient PRNG
Diffstat (limited to 'src/GameDraw.cpp')
-rw-r--r--src/GameDraw.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GameDraw.cpp b/src/GameDraw.cpp
index e783559..a916d7e 100644
--- a/src/GameDraw.cpp
+++ b/src/GameDraw.cpp
@@ -20,7 +20,7 @@
// along with Black Shades. If not, see <https://www.gnu.org/licenses/>.
#include "Game.h"
-#include "Support.h"
+#include "misc.h"
extern int thirdperson;
extern float multiplier;
@@ -619,9 +619,9 @@ void Game::DrawGLScene(void)
if (person[0].aiming && person[0].whichgun != grenade
&& thirdperson == 0)
camerashake = 0;
- glTranslatef(Random() % 100 / 100.0f * camerashake,
- Random() % 100 / 100.0f * camerashake,
- Random() % 100 / 100.0f * camerashake);
+ glTranslatef(randInt(-99, 99) / 100.0f * camerashake,
+ randInt(-99, 99) / 100.0f * camerashake,
+ randInt(-99, 99) / 100.0f * camerashake);
}
camera.Apply();