Core/GameObjects: Fixed crash when GameObject::Delete was used for transports

This commit is contained in:
Shauren
2022-07-10 00:54:36 +02:00
committed by Ovahlord
parent 33843c506f
commit 279f1cccae

View File

@@ -1221,7 +1221,8 @@ void GameObject::Delete()
SendGameObjectDespawn();
SetGoState(GO_STATE_READY);
if (m_goInfo->type != GAMEOBJECT_TYPE_TRANSPORT)
SetGoState(GO_STATE_READY);
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);