diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-04-25 15:44:09 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-25 15:44:09 -0400 |
commit | 11782a7183707e8e0a3ed6f6e183ccaf4a6de74d (patch) | |
tree | ae14c2e2d3c7736da67a3fcde019419476681048 /src | |
parent | 5474a548630cccbf7434c2280320f7652bb7c1af (diff) | |
download | tmwa-16.4.25.1.tar.gz tmwa-16.4.25.1.tar.bz2 tmwa-16.4.25.1.tar.xz tmwa-16.4.25.1.zip |
allow setarray and cleararray to have no block listv16.4.25.1
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script-fun.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 6b9f9a7..7379600 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -1465,12 +1465,13 @@ void builtin_setarray(ScriptState *st) j = getarraysize2(reg, bl); } else if (prefix != '$' && !name.startswith(".@"_s)) - bl = map_id_is_player(st->rid); - - if (!bl) { - PRINTF("builtin_setarray: rid not attached\n"_fmt); - return; + bl = map_id_is_player(st->rid); + if (!bl) + { + PRINTF("builtin_setarray: rid not attached\n"_fmt); + return; + } } for (; i < st->end - st->start - 2 && j < 256; i++, j++) @@ -1506,12 +1507,13 @@ void builtin_cleararray(ScriptState *st) if (prefix == '.' && !name.startswith(".@"_s)) bl = map_id_is_npc(st->oid); else if (prefix != '$' && !name.startswith(".@"_s)) - bl = map_id_is_player(st->rid); - - if (!bl) { - PRINTF("builtin_cleararray: no block list\n"_fmt); - return; + bl = map_id_is_player(st->rid); + if (!bl) + { + PRINTF("builtin_cleararray: no block list\n"_fmt); + return; + } } for (int i = 0; i < sz; i++) |