summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-01-01 16:09:22 -0500
committergumi <git@gumi.ca>2018-01-01 18:09:15 -0500
commitb7ec6e535d314a64aeaf426e2e4c068cd7c4bb34 (patch)
treef29e84563c80e5438da35e608967c33c195dde98 /src/map/script-fun.cpp
parente808b814cd0899342fcba21cc74ec059772ceb5e (diff)
downloadtmwa-b7ec6e535d314a64aeaf426e2e4c068cd7c4bb34.tar.gz
tmwa-b7ec6e535d314a64aeaf426e2e4c068cd7c4bb34.tar.bz2
tmwa-b7ec6e535d314a64aeaf426e2e4c068cd7c4bb34.tar.xz
tmwa-b7ec6e535d314a64aeaf426e2e4c068cd7c4bb34.zip
release v18.1.1v18.1.1
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r--src/map/script-fun.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 2036782..8aa8b5c 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -1130,8 +1130,9 @@ void builtin_destroy(ScriptState *st)
return;
nd = nd->is_script();
- //assert(nd->disposable == true); we don't care about it anymore
npc_free(nd);
+ st->oid = BlockId();
+
if (!HARG(0))
st->state = ScriptEndState::END;
}
@@ -1196,6 +1197,8 @@ void builtin_puppet(ScriptState *st)
nd->npc_subtype = NpcSubtype::SCRIPT;
npc_script++;
+ nd->deletion_pending = false;
+
nd->n = map_addnpc(nd->bl_m, nd);
map_addblock(nd);