summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnpc/functions/default_npc_checks.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/npc/functions/default_npc_checks.txt b/npc/functions/default_npc_checks.txt
index 0cc6e643..c02cf016 100755
--- a/npc/functions/default_npc_checks.txt
+++ b/npc/functions/default_npc_checks.txt
@@ -3,8 +3,9 @@ function script PCtoNPCRange {
@npc_check = 0;
if(!@npc_distance) set @npc_distance, 4; // <== default distance
if(@npc_distance < 0) set @npc_distance, ATTACKRANGE;
- cleararray @npc_loc, 0, 3;
- if (!isin(getmap(), .x, .y, @npc_distance))
+ .@x=getvariableofnpc(.x, getnpcid());
+ .@y=getvariableofnpc(.y, getnpcid());
+ if (!isin(getmap(), .@x, .@y, @npc_distance))
goto L_Return;
@npc_check = 1;
if(@distance_handler) goto L_Return;
@@ -21,7 +22,6 @@ L_Return:
@dnpc_name$ = "";
@distance_handler = 0;
@npc_distance = 0;
- cleararray @npc_loc, 0, 3;
return;
}