Skip to content

Fix & improvement getPedMoveState #4316

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

Merged
merged 1 commit into from
Aug 1, 2025

Conversation

FileEX
Copy link
Contributor

@FileEX FileEX commented Jul 28, 2025

Fixed #1598 #1594 #1590

The getPedMoveState function behaves somewhat unreliably. It often incorrectly returns fall, which is caused by the imprecise behavior of IsOnGround (in some areas of the map, the player's position might be, for example, z = 8.5, while the ground is z = 7.5).

This PR fixes the mentioned issues and adds new states (previously incorrectly labeled as fall):

  • swim
  • walk_to_point (when a ped is walking to a vehicle door to get in)
  • ascent_jetpack – ascending with jetpack (space key)
  • descent_jetpack – descending with jetpack (shift key)
  • jetpack_flying – flying with jetpack
  • roll - Added the previously planned roll state

Here is a screenshot of one of the reported issues I received:
image

Thanks to @sacr1ficez for reporting in DM

@botder botder merged commit c43c1b9 into multitheftauto:master Aug 1, 2025
6 checks passed
@botder botder added this to the 1.7.1 milestone Aug 1, 2025
@botder botder added enhancement New feature or request bugfix Solution to a bug of any kind labels Aug 1, 2025
MTABot pushed a commit that referenced this pull request Aug 1, 2025
@FileEX FileEX deleted the bugfix/move_state branch August 1, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Solution to a bug of any kind enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getPedMoveState can returns "fall" while crawling
2 participants