From 44351b14fae254cb7a4c0e2e4e54c732b9151d63 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sun, 20 Feb 2011 17:39:27 +0100 Subject: Fixed enabling/disabling npcs by enqueuing the insertion. This permits to handle such operation after the object locking, thus avoiding to fail on the assertion: assert(!dbgLockObjects); when inserting a npc. Reviewed-by: Ablu. --- src/scripting/lua.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/scripting/lua.cpp') diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 8be31f46..76280242 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -259,8 +259,7 @@ static int npc_enable(lua_State *s) if (p) { p->enable(true); - bool b = GameState::insert(p); - assert(b); (void)b; + GameState::enqueueInsert(p); } return 0; -- cgit v1.2.3-70-g09d2