summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
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);