From b9de23897ed9674e7d2719567ad35d8cc08469d4 Mon Sep 17 00:00:00 2001 From: Sylae Corell Date: Mon, 21 Oct 2013 18:21:11 -0600 Subject: [PATCH] Revert "Seeding the PRNG on every call to it." This reverts commit 7168ee91ded091c7e1e0851893bbde3a9be04701. --- Win32/Blades of Exile/tools/mathutil.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Win32/Blades of Exile/tools/mathutil.cpp b/Win32/Blades of Exile/tools/mathutil.cpp index fc732792..8b807ced 100644 --- a/Win32/Blades of Exile/tools/mathutil.cpp +++ b/Win32/Blades of Exile/tools/mathutil.cpp @@ -8,8 +8,8 @@ #include #include "mathutil.h" - -//minmax, move_to_zero and ex_abs (return absolute value) are templates in the header file + +//minmax, move_to_zero and ex_abs (return absolute value) are templates in the header file short get_ran (short times,short min,short max){ long int store; @@ -18,7 +18,6 @@ short get_ran (short times,short min,short max){ if(max < min) max = min; for (i = 1; i < times + 1; i++) { - srand(GetTickCount()); store = rand(); to_ret += min + (store % (max - min + 1));//min + (((store + 32767) * (max - min + 1)) / 65536); } @@ -54,4 +53,4 @@ short gcd(short a, short b){ // Grabbed from Wikipedia and translated to C code a = t; } return a; -} +}