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

Closes #23115

(cherry picked from commit 5f04c829a8)
This commit is contained in:
Killyana
2019-03-18 01:04:38 +01:00
committed by Shauren
parent 36feb3bfe7
commit a99a60bcf3

View File

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