Core/GameObject: Remove summoned game objects from the map after calling SetSpawnedByDefault(false) (#23120)

Closes #23115
This commit is contained in:
Killyana
2019-03-18 01:04:38 +01:00
committed by GitHub
parent 92bf5b1ba7
commit 5f04c829a8

View File

@@ -793,11 +793,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;
}