diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-09-09 17:12:29 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-09-09 17:12:29 +0300 |
commit | 9cadaf824b3a59c85ad03f9c7185f43724b8e7ff (patch) | |
tree | 81faa2491a264a29c626e560ccf58601ef02ebd3 /src/content_sao.cpp | |
parent | 1cc1b93e65d6d88e20786383cb09caf22a8c6494 (diff) | |
download | minetest-9cadaf824b3a59c85ad03f9c7185f43724b8e7ff.tar.gz minetest-9cadaf824b3a59c85ad03f9c7185f43724b8e7ff.tar.bz2 minetest-9cadaf824b3a59c85ad03f9c7185f43724b8e7ff.zip |
Add dtime_s to entity activation
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 843ab29f7..7526e0353 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -376,9 +376,9 @@ LuaEntitySAO::~LuaEntitySAO() } } -void LuaEntitySAO::addedToEnvironment() +void LuaEntitySAO::addedToEnvironment(u32 dtime_s) { - ServerActiveObject::addedToEnvironment(); + ServerActiveObject::addedToEnvironment(dtime_s); // Create entity from name lua_State *L = m_env->getLua(); @@ -390,7 +390,7 @@ void LuaEntitySAO::addedToEnvironment() // 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()); + scriptapi_luaentity_activate(L, m_id, m_init_state.c_str(), dtime_s); } } @@ -805,9 +805,9 @@ std::string PlayerSAO::getDescription() } // Called after id has been set and has been inserted in environment -void PlayerSAO::addedToEnvironment() +void PlayerSAO::addedToEnvironment(u32 dtime_s) { - ServerActiveObject::addedToEnvironment(); + ServerActiveObject::addedToEnvironment(dtime_s); ServerActiveObject::setBasePosition(m_player->getPosition()); m_player->setPlayerSAO(this); m_player->peer_id = m_peer_id; |