Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core/MovementHandler: Make it possible to get exact player position from m_movementInfo in some cases #29824

Open
wants to merge 1 commit into
base: 3.3.5
Choose a base branch
from

Conversation

r4d1sh
Copy link
Contributor

@r4d1sh r4d1sh commented Mar 21, 2024

Changes proposed:

The problem is that upon player landing, we call Player::HandleFall and Unit::RemoveAurasWithInterruptFlags before updating Player::m_movementInfo and before calling Unit::UpdatePosition.

This leads to a situation where if we're writing a PlayerScript and hook player death from falling, or writing an AuraScript and hook aura removal (parachute) then within the same server tick, we won't be able to get the exact position where the player landed.

In this PR, I've changed the call order in WorldSession::HandleMovementOpcodes so that the order of packets sent to client remains the same. But now we can get the exact position of the player (player->m_movementInfo.pos) at the moment of landing.

Tests performed:

Builded and tested in-game.

@r4d1sh r4d1sh changed the title Core/MovementHandler: Make it possible to get exact player position f… Core/MovementHandler: Make it possible to get exact player position from m_movementInfo in some cases Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants