diff options
| author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-02-20 17:39:27 +0100 |
|---|---|---|
| committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-02-20 21:49:24 +0100 |
| commit | 44351b14fae254cb7a4c0e2e4e54c732b9151d63 (patch) | |
| tree | 8e82ffab8be89c69ceb8e60f34a6c0ffe4e4e9db /src/scripting | |
| parent | 1b645c333cd97bacbacbcba135607c48dd549287 (diff) | |
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.
Diffstat (limited to 'src/scripting')
| -rw-r--r-- | src/scripting/lua.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 8be31f4..7628024 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; |
