Modernize client code (#6250)
[oweals/minetest.git] / src / content_sao.cpp
index df5cae34fae3b59725c0dbab57d78c5391db23a0..674ab580c389cea7490a9999e0cebbec866dc123 100644 (file)
@@ -582,8 +582,10 @@ int LuaEntitySAO::punch(v3f dir,
                }
        }
 
-       if (getHP() == 0)
+       if (getHP() == 0) {
                m_removed = true;
+               m_env->getScriptIface()->luaentity_on_death(m_id, puncher);
+       }
 
 
 
@@ -797,6 +799,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id
        // end of default appearance
        m_prop.is_visible = true;
        m_prop.makes_footstep_sound = true;
+       m_prop.stepheight = PLAYER_DEFAULT_STEPHEIGHT * BS;
        m_hp = PLAYER_MAX_HP;
 }