diff options
author | gumi <git@gumi.ca> | 2018-03-28 16:51:38 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-03-28 16:51:38 -0400 |
commit | 235c563427a6f2c0324145f3593640ef06472f1e (patch) | |
tree | 16476c6a0b44b68d92709e7321a0e42f3e96e33a /npc/commands | |
parent | 23a3adb0a735c2f71b25f3cfb4eddeee8214e278 (diff) | |
download | serverdata-235c563427a6f2c0324145f3593640ef06472f1e.tar.gz serverdata-235c563427a6f2c0324145f3593640ef06472f1e.tar.bz2 serverdata-235c563427a6f2c0324145f3593640ef06472f1e.tar.xz serverdata-235c563427a6f2c0324145f3593640ef06472f1e.zip |
use getmapinfo instead of getmapusers to check if a map exists
Diffstat (limited to 'npc/commands')
-rw-r--r-- | npc/commands/warp.txt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt index 508827fa..f042f58a 100644 --- a/npc/commands/warp.txt +++ b/npc/commands/warp.txt @@ -44,11 +44,9 @@ OnCall: .@x = .@req_y ? .@req_x : .@x; .@y = .@req_y ? .@req_y : .@y; - // FIXME: here getmapusers() is used only to check if the map exists - // replace this when/if we get a dedicated function for that - if (getmapusers(.@map$) < 0) + if (!map_exists(.@map$)) { - if (getmapusers(.@atcmd_parameters$[0]) >= 0) + if (map_exists(.@atcmd_parameters$[0])) { .@map$ = .@atcmd_parameters$[0]; } |