Core/Movement: ported movement speed change acknowledge packet handling from 335 branch

This commit is contained in:
Ovahlord committed 2021-11-08 12:44:49 +01:00
1 parent edbbeba5a2
commit 9faf867f34
13 files changed
+622 -162

No files matched your search

+2 -2
View File
@@ -28,8 +28,7 @@ GameClient::GameClient(WorldSession* sessionToServer)
void GameClient::AddAllowedMover(Unit* unit)
{
if (GameClient* previousController = unit->GetGameClientMovingMe())
previousController->RemoveAllowedMover(unit);
ASSERT(!unit->GetGameClientMovingMe() || unit->GetGameClientMovingMe() == this);
_allowedMovers.insert(unit->GetGUID());
unit->SetGameClientMovingMe(this);
@@ -37,6 +36,7 @@ void GameClient::AddAllowedMover(Unit* unit)
void GameClient::RemoveAllowedMover(Unit* unit)
{
unit->PurgeAndApplyPendingMovementChanges();
_allowedMovers.erase(unit->GetGUID());
if (unit->GetGameClientMovingMe() == this)
{