summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-09-16 07:49:36 -0400
committerMadCamel <madcamel@gmail.com>2009-09-16 07:49:36 -0400
commit03149635727f16b45e99fd5f2f3647d6c4cb749f (patch)
tree4b9f06028bd79a152e485629e175b76447d33b98 /src/map/mob.c
parentd7b6afc444c1fac508dd5cc4bdf7e4dfa57e50c2 (diff)
downloadtmwa-03149635727f16b45e99fd5f2f3647d6c4cb749f.tar.gz
tmwa-03149635727f16b45e99fd5f2f3647d6c4cb749f.tar.bz2
tmwa-03149635727f16b45e99fd5f2f3647d6c4cb749f.tar.xz
tmwa-03149635727f16b45e99fd5f2f3647d6c4cb749f.zip
Found and replaced more calls to rand()
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index f04ff28..cd74caa 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1651,7 +1651,7 @@ static int mob_randomwalk(struct mob_data *md,int tick)
int i,x,y,c,d=12-md->move_fail_count;
if(d<5) d=5;
for(i=0;i<retrycount;i++){ // Search of a movable place
- int r=rand();
+ int r=mt_random();
x=md->bl.x+r%(d*2+1)-d;
y=md->bl.y+r/(d*2+1)%(d*2+1)-d;
if((c=map_getcell(md->bl.m,x,y))!=1 && c!=5 && mob_walktoxy(md,x,y,1)==0){