Core/Transports: Delayed adding transport model to next tick after teleporting to fix race conditions happening when teleporting transport happens at the same time as destination map balances its dynamic LoS tree
This commit is contained in:
1 parent
0594b1d838
commit
5c60976046
3 files changed
+20
-3
No files matched your search
@@ -143,7 +143,12 @@ void GameObject::AddToWorld()
|
||||
// The state can be changed after GameObject::Create but before GameObject::AddToWorld
|
||||
bool toggledState = GetGoType() == GAMEOBJECT_TYPE_CHEST ? getLootState() == GO_READY : (GetGoState() == GO_STATE_READY || IsTransport());
|
||||
if (m_model)
|
||||
GetMap()->InsertGameObjectModel(*m_model);
|
||||
{
|
||||
if (Transport* trans = ToTransport())
|
||||
trans->SetDelayedAddModelToMap();
|
||||
else
|
||||
GetMap()->InsertGameObjectModel(*m_model);
|
||||
}
|
||||
|
||||
EnableCollision(toggledState);
|
||||
WorldObject::AddToWorld();
|
||||
|
||||
Reference in new issue
Block a user