From 68418f8e6d1c91191c9f1a813286729240fa302e Mon Sep 17 00:00:00 2001 From: Reid Date: Sun, 20 Aug 2017 00:47:15 +0200 Subject: Fix doors script issue, getareausers() used the PC location instead of the NPC location. --- npc/functions/doors.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'npc') diff --git a/npc/functions/doors.txt b/npc/functions/doors.txt index ea223500..72bd6012 100644 --- a/npc/functions/doors.txt +++ b/npc/functions/doors.txt @@ -17,7 +17,19 @@ function script doorTouch { } function script doorUnTouch { - if (getareausers() == 0) + if (.map$ == "") + { + if (getmapxy(.@map$, .@x, .@y, UNITTYPE_NPC) != 0) + { + close; + } + } + else + { + .@map$ = .map$; + } + + if (getareausers(.@map$) == 0) { .dir = 4; initnpctimer; -- cgit v1.2.3-70-g09d2