Core/GameObject: Remove summoned game objects from the map after calling SetSpawnedByDefault(false) (ported commit: 5f04c829a861da7d5a4f0ac955d6c1fbcd917af9)

This commit is contained in:
Ovahlord committed 2019-03-18 14:27:21 +01:00
1 parent da25314178
commit f57a7a3356
1 file changed
+1 -2
@@ -693,11 +693,10 @@ void GameObject::Update(uint32 diff)
if (!m_respawnDelayTime)
return;
// ToDo: Decide if we should properly despawn these. Maybe they expect to be able to manually respawn from script?
if (!m_spawnedByDefault)
{
m_respawnTime = 0;
DestroyForNearbyPlayers(); // old UpdateObjectVisibility()
Delete();
return;
}