diff options
author | Reid <reidyaro@gmail.com> | 2017-08-20 00:47:15 +0200 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2017-08-20 00:47:15 +0200 |
commit | 68418f8e6d1c91191c9f1a813286729240fa302e (patch) | |
tree | 85c63094e79f33bdd99f88701156b1620c5f0ecd | |
parent | 0ea634980d06edb580d9872b71139e60012f5b91 (diff) | |
download | serverdata-68418f8e6d1c91191c9f1a813286729240fa302e.tar.gz serverdata-68418f8e6d1c91191c9f1a813286729240fa302e.tar.bz2 serverdata-68418f8e6d1c91191c9f1a813286729240fa302e.tar.xz serverdata-68418f8e6d1c91191c9f1a813286729240fa302e.zip |
Fix doors script issue, getareausers() used the PC location instead of the NPC location.
-rw-r--r-- | npc/functions/doors.txt | 14 |
1 files changed, 13 insertions, 1 deletions
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; |