summaryrefslogtreecommitdiff
path: root/src/map/path.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-17 18:06:34 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-17 18:06:34 +0000
commit95548cb1caad95933e2b36df9a13af070b733b04 (patch)
treeb9ce67cc8b45c6956528e5bb2935900b6d8ad441 /src/map/path.c
parenta09cc2371ac0a2534f514a35a5637614c11f6a37 (diff)
downloadhercules-95548cb1caad95933e2b36df9a13af070b733b04.tar.gz
hercules-95548cb1caad95933e2b36df9a13af070b733b04.tar.bz2
hercules-95548cb1caad95933e2b36df9a13af070b733b04.tar.xz
hercules-95548cb1caad95933e2b36df9a13af070b733b04.zip
Enabled Mersenne Twister MT19937 as random number generator instead of standard `rand()` function (follow-up to r14865, r14870).
- It fixes issues caused by RAND_MAX being only 32k in Windows system (bugreport:1927, bugreport:86). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/path.c')
-rw-r--r--src/map/path.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/path.c b/src/map/path.c
index bbbb99a08..b2d34a26b 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -3,6 +3,7 @@
#include "../common/cbasetypes.h"
#include "../common/nullpo.h"
+#include "../common/random.h"
#include "../common/showmsg.h"
#include "../common/malloc.h"
#include "map.h"
@@ -175,7 +176,7 @@ int path_blownpos(int m,int x0,int y0,int dx,int dy,int count)
int fy = ( dy != 0 && map_getcellp(md,x0,y0+dy,CELL_CHKPASS) );
if( fx && fy )
{
- if(rand()&1)
+ if(rnd()&1)
dx=0;
else
dy=0;