diff options
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c index bc9465781..559cab96d 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2305,7 +2305,7 @@ int map_random_dir(struct block_list *bl, short *x, short *y) if (dist < 1) dist =1; do { - j = rand()%8; //Pick a random direction + j = 1 + 2*(rand()%4); //Pick a random diagonal direction segment = 1+(rand()%dist); //Pick a random interval from the whole vector in that direction xi = bl->x + segment*dirx[j]; segment = (short)sqrt((float)(dist2 - segment*segment)); //The complement of the previously picked segment |