Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix vehicle state desync when warpPedIntoVehicle is called during onVehicleStartExit #4458

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

Conversation

@MohabCodeX
Copy link
Contributor

@MohabCodeX MohabCodeX commented Sep 13, 2025

Thanks to @FileEX for pointing this issue out.

Statement: When warping an occupant into a vehicle during onVehicleStartExit, their state becomes bugged: the game still thinks they are inside the car, and they cannot enter any other vehicle until the vehicle respawns or the player dies

  • Player tries to exit vehicle
  • onVehicleStartExit event is triggered
  • Script calls warpPedIntoVehicle(player, source) - player is warped back into vehicle
  • BUG: Server still processes the exit and sets player as "exiting"
  • Result: Player appears to be in vehicle but game thinks they're exiting
  • Appears "stuck" in an inconsistent state
2025年09月13日.15-14-20.1.mp4

After Fix:

  • Player tries to exit vehicle
  • onVehicleStartExit event is triggered
  • Script calls warpPedIntoVehicle(player, source) - player is warped back into vehicle
  • Fixed: Server detects that warp occurred during the event via m_bOccupantChanged flag
  • Result: Server aborts the exit process and sends VEHICLE_ATTEMPT_FAILED
2025年09月13日.15-06-43.2.mp4

Player stays in a consistent state, with correct position updates and the ability to continue normal gameplay without getting stuck.

FileEX reacted with thumbs up emoji Fernando-A-Rocha and Wannacry-ops reacted with heart emoji Fernando-A-Rocha and Wannacry-ops reacted with rocket emoji
@FileEX FileEX added the bugfix Solution to a bug of any kind label Sep 16, 2025
@FileEX FileEX merged commit 679199e into multitheftauto:master Sep 28, 2025
@FileEX FileEX added this to the 1.7.1 milestone Sep 28, 2025
MTABot pushed a commit that referenced this pull request Sep 28, 2025
679199e Fix vehicle state desync when `warpPedIntoVehicle` is called during `onVehicleStartExit` (#4458)
@MohabCodeX MohabCodeX deleted the fix/vehicle-start-exit-warp-state-bug branch October 3, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@FileEX FileEX FileEX approved these changes

Assignees

No one assigned

Labels

bugfix Solution to a bug of any kind sync

Projects

None yet

Milestone

1.7.1

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /