Core/GameObjects: Transport (type 11) improvements

* Fully synchronize serverside animation progress with client
* Implemented updating passenger positions on elevators
* Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
This commit is contained in:
Shauren authored and Ovahlord committed 2022-06-18 21:36:17 +02:00
1 parent b596675c3b
commit 25465699f7
32 files changed
+681 -323

No files matched your search

+5 -5
View File
@@ -3779,12 +3779,12 @@ void Spell::EffectActivateObject(SpellEffIndex effIndex)
case GameObjectActions::GoTo8thFloor:
case GameObjectActions::GoTo9thFloor:
case GameObjectActions::GoTo10thFloor:
{
// Cast is kind of loose but it'll do
if (Transport* transportTarget = gameObjTarget->ToTransport())
transportTarget->SetTransportState(GO_STATE_TRANSPORT_STOPPED, uint32_t(action) - uint32(GameObjectActions::GoTo1stFloor));
static_assert(int32(GO_STATE_TRANSPORT_ACTIVE) == int32(GameObjectActions::GoTo1stFloor));
if (gameObjTarget->GetGoType() == GAMEOBJECT_TYPE_TRANSPORT)
gameObjTarget->SetGoState(GOState(action));
else
TC_LOG_ERROR("spell", "Spell %d targeted non-transport gameobject for transport only action \"Go to Floor\" %d in effect %d", m_spellInfo->Id, int32(action), int32(effIndex));
break;
}
case GameObjectActions::None:
TC_LOG_FATAL("spell", "Spell %d has action type NONE in effect %d", m_spellInfo->Id, int32(effIndex));
break;