aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-04-08 23:13:27 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-04-08 23:16:15 +0300
commitc59d139eebf06680bb4ea019b9a952c20e334154 (patch)
tree1e8bf3fb9680094c13b8499de717a78e197ff159
parent2b4d21160f1376b80068e2dec4fde3036fd9d6b4 (diff)
downloadminetest-c59d139eebf06680bb4ea019b9a952c20e334154.tar.gz
minetest-c59d139eebf06680bb4ea019b9a952c20e334154.tar.bz2
minetest-c59d139eebf06680bb4ea019b9a952c20e334154.zip
Fix crash after 'LuaEntity name "particles:smoke" not defined' and similar errors
-rw-r--r--src/content_sao.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 2b3f7c022..205621d79 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,