diff options
author | Wushin <pasekei@gmail.com> | 2015-04-29 22:20:48 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2015-04-29 22:20:48 -0500 |
commit | 3aa86310112d778f34ce8d2e8bc768849b32ff6f (patch) | |
tree | a025e0a33b60a17511802b7812b24d2eec565ae1 /src/map | |
parent | e6ee7b3f99935a594e6462472fdc9d075408da0f (diff) | |
parent | 9a1b2394ebd9707042aa56862dd35863ff7f3568 (diff) | |
download | tmwa-3aa86310112d778f34ce8d2e8bc768849b32ff6f.tar.gz tmwa-3aa86310112d778f34ce8d2e8bc768849b32ff6f.tar.bz2 tmwa-3aa86310112d778f34ce8d2e8bc768849b32ff6f.tar.xz tmwa-3aa86310112d778f34ce8d2e8bc768849b32ff6f.zip |
Merge pull request #74 from mekolat/freeloop
make freeloop check the value
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script-call.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp index f412328..c3c6aa1 100644 --- a/src/map/script-call.cpp +++ b/src/map/script-call.cpp @@ -757,7 +757,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript) { rerun_pos = st->scriptp.pos; st->state = ScriptEndState::ZERO; - if (!st->freeloop && gotocount > 0 && (--gotocount) <= 0) + if (st->freeloop != 1 && gotocount > 0 && (--gotocount) <= 0) { PRINTF("run_script: infinity loop !\n"_fmt); st->state = ScriptEndState::END; @@ -806,7 +806,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript) st->state = ScriptEndState::END; break; } - if (!st->freeloop && cmdcount > 0 && (--cmdcount) <= 0) + if (st->freeloop != 1 && cmdcount > 0 && (--cmdcount) <= 0) { PRINTF("run_script: infinity loop !\n"_fmt); st->state = ScriptEndState::END; |