From c59d139eebf06680bb4ea019b9a952c20e334154 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 8 Apr 2012 23:13:27 +0300 Subject: [PATCH] Fix crash after 'LuaEntity name "particles:smoke" not defined' and similar errors --- src/content_sao.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 2b3f7c02..205621d7 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -389,10 +389,9 @@ void LuaEntitySAO::addedToEnvironment() scriptapi_luaentity_get_properties(L, m_id, &m_prop); // Initialize HP from properties m_hp = m_prop.hp_max; + // Activate entity, supplying serialized state + scriptapi_luaentity_activate(L, m_id, m_init_state.c_str()); } - - // Activate entity, supplying serialized state - scriptapi_luaentity_activate(L, m_id, m_init_state.c_str()); } ServerActiveObject* LuaEntitySAO::create(ServerEnvironment *env, v3f pos, -- 2.30.2