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

Fix flight form & fall damage #16955

Merged
merged 1 commit into from Apr 13, 2016
Merged

Fix flight form & fall damage #16955

merged 1 commit into from Apr 13, 2016

Conversation

vtronko
Copy link

@vtronko vtronko commented Apr 13, 2016

Fixes #16627 issue.
This handles all variations of that uninteded behavior, including druid flight form and .gm fly commands. Tested in-game, it works flawlessly.

@Shauren
Copy link
Member

Shauren commented Apr 13, 2016

I'm liking this idea but I would like you to change two things

  • Codestyle - don't wrap the if in one line and dont wrap single statements in brackets
  • Use SetFallInformation(0, GetPositionZ()); instead of assigning m_lastFallZ directly (you aren't resetting fall time variable properly)

@Shauren Shauren self-assigned this Apr 13, 2016
@vtronko
Copy link
Author

vtronko commented Apr 13, 2016

@Shauren i was thinking about SetFallInformation(0, GetPositionZ()), but we already set fallTime to 0 in Unit::SetCanFly, so we will touch this variable two times.
But if you think it's better idea - here is updated diff.

@Shauren
Copy link
Member

Shauren commented Apr 13, 2016

Unit::SetCanFly sets that value in movementInfo.fallTime field, SetFallInformation modifies m_lastFallTime (member of Player class)

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

3 participants