mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-04 08:25:01 -05:00
Delete unknown LuaEntities when punched
This commit is contained in:
parent
2e67fa3e48
commit
008de2fb8f
@ -1658,8 +1658,11 @@ std::string LuaEntitySAO::getStaticData()
|
|||||||
|
|
||||||
void LuaEntitySAO::punch(ServerActiveObject *puncher, float time_from_last_punch)
|
void LuaEntitySAO::punch(ServerActiveObject *puncher, float time_from_last_punch)
|
||||||
{
|
{
|
||||||
if(!m_registered)
|
if(!m_registered){
|
||||||
|
// Delete unknown LuaEntities when punched
|
||||||
|
m_removed = true;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
lua_State *L = m_env->getLua();
|
lua_State *L = m_env->getLua();
|
||||||
scriptapi_luaentity_punch(L, m_id, puncher, time_from_last_punch);
|
scriptapi_luaentity_punch(L, m_id, puncher, time_from_last_punch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user