Skip to content

Commit

Permalink
Player: Fix collision height check login protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jan 4, 2025
1 parent d0d657a commit aa6d157
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21464,6 +21464,9 @@ void Player::SendInitialPacketsAfterAddToMap()
if (IsImmobilizedState()) // TODO: Figure out if this protocol is correct
SendMoveRoot(true);

if (m_pendingMountId)
SendCollisionHeightUpdate(CalculateCollisionHeight(m_pendingMountId));

SendAurasForTarget(this);

SendEnchantmentDurations(); // must be after add to map
Expand Down
5 changes: 4 additions & 1 deletion src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10617,6 +10617,9 @@ void Unit::RemoveFromWorld()
transport->RemovePassenger(this);

m_FollowingRefManager.clearReferences();

if (m_vehicleInfo)
m_vehicleInfo->Cleanup();
}

WorldObject::RemoveFromWorld();
Expand Down Expand Up @@ -12570,7 +12573,7 @@ void Unit::EndSpline()

void Unit::SendCollisionHeightUpdate(float height)
{
if (IsClientControlled())
if (IsClientControlled() && IsInWorld())
{
if (Player const* player = GetControllingPlayer())
{
Expand Down

0 comments on commit aa6d157

Please sign in to comment.