summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 249d4c321..b0621aa40 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -17,6 +17,7 @@
#include "../common/utils.h"
#include "map.h"
+#include "path.h"
#include "clif.h"
#include "chrif.h"
#include "itemdb.h"
@@ -11594,7 +11595,7 @@ BUILDIN_FUNC(distance)
x1 = script_getnum(st,4);
y1 = script_getnum(st,5);
- script_pushint(st,distance(x0-x1, y0-y1));
+ script_pushint(st,distance_xy(x0,y0,x1,y1));
return 0;
}