aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChaouki Dhib <chaodhib@gmail.com>2021-07-04 22:01:22 +0200
committerChaouki Dhib <chaodhib@gmail.com>2021-07-04 22:01:22 +0200
commitef113ce673455a0bf112741bb6fd7673b71f7863 (patch)
treeb809e27aad4957c4079db662923ff3414462d1fd /src
parent0c90970b0668df93356d035ecff8124b5dc5c44d (diff)
Revert "Core/Movement: Better handle cases of passing incomplete data to ReadMovementInfo()"
This reverts commit 0c90970b0668df93356d035ecff8124b5dc5c44d.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Server/WorldSession.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 5a6d42fd38f..e3c9ad3569c 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -927,16 +927,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi)
mi->RemoveMovementFlag((maskToRemove));
#endif
- Unit* mover = GetGameClient()->GetActivelyMovedUnit();
- if (!mover)
- {
- if (mi->guid.IsEmpty())
- {
- TC_LOG_ERROR("entities.unit", "WorldSession::ReadMovementInfo: GetActivelyMovedUnit() returned no mover and mi->guid is empty, opcode %u", static_cast<uint32>(data.GetOpcode()));
- return;
- }
- mover = GetPlayer()->GetGUID() == mi->guid ? GetPlayer() : ObjectAccessor::GetUnit(*GetPlayer(), mi->guid);
- }
+ Unit* mover = GetPlayer()->GetGUID() == mi->guid ? GetPlayer() : ObjectAccessor::GetUnit(*GetPlayer(), mi->guid);
ASSERT(mover, "if the server allows this unit to be moved by the client, the unit should still exist!");
if (!GetPlayer()->GetVehicleBase() || !(GetPlayer()->GetVehicle()->GetVehicleInfo()->Flags & VEHICLE_FLAG_FIXED_POSITION))