mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 01:05:48 +01:00 
			
		
		
		
	Delete unknown LuaEntities when punched
This commit is contained in:
		@@ -1658,8 +1658,11 @@ std::string LuaEntitySAO::getStaticData()
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
	}
 | 
			
		||||
	lua_State *L = m_env->getLua();
 | 
			
		||||
	scriptapi_luaentity_punch(L, m_id, puncher, time_from_last_punch);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user