summaryrefslogtreecommitdiff
path: root/src/map/script-call.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script-call.cpp')
-rw-r--r--src/map/script-call.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp
index 289cb68..5541043 100644
--- a/src/map/script-call.cpp
+++ b/src/map/script-call.cpp
@@ -822,6 +822,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
dumb_ptr<npc_data> nd = map_id_is_npc(st->oid);
PRINTF("run_script: infinity loop! @ %s\n"_fmt,
nd ? nd->name : NpcName());
+ st->state = ScriptEndState::END;
}
}
break;
@@ -884,6 +885,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
dumb_ptr<npc_data> nd = map_id_is_npc(st->oid);
PRINTF("run_script: infinity loop! @ %s\n"_fmt,
nd ? nd->name : NpcName());
+ st->state = ScriptEndState::END;
}
}
dumb_ptr<map_session_data> sd = map_id2sd(st->rid);
@@ -974,6 +976,8 @@ int run_script_l(ScriptPointer sp, BlockId rid, BlockId oid,
st.scriptp = sp;
st.rid = rid;
st.oid = oid;
+ st.freeloop = 0;
+ st.is_true = 0;
for (i = 0; i < args.size(); i++)
{