summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c
index abcd26440..422d1f3a9 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2170,7 +2170,7 @@ int map_random_dir(struct block_list *bl, short *x, short *y) {
do {
j = rand()%8; //Pick a random direction
- segment = rand()%dist; //Pick a random interval from the whole vector in that 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(dist2 - segment*segment); //The complement of the previously picked segment
yi = bl->y + segment*diry[j];