Skip to content

Fixed: train passenger sync - #1100

Merged
AmyrAhmady merged 4 commits into
openmultiplayer:masterfrom
uifdev:train-passenger-fix
Jul 12, 2025
Merged

AmyrAhmady merged 4 commits into
openmultiplayer:masterfrom
uifdev:train-passenger-fix

Conversation

@uifdev

@uifdev uifdev commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

This PR fixes the following issues related to train passenger sync:

  • Players inside a train carriage appear paused; OnPlayerUpdate is not triggered and GetPlayerVehicleID returns 0.
  • Entering/exiting a train carriage does not trigger OnPlayerEnter/OnPlayerExitVehicle.

@beckzyb

beckzyb commented Jul 1, 2025

Copy link
Copy Markdown

Is OnPlayerEnter/ExitVehicle called in SA-MP? I wouldn't have imagined they would be with the player being put into the carriage without entering/exiting animations being performed. Regardless of that, you're right that OnPlayerStateChange and OnPlayerUpdate should be.

@NexiusTailer

Copy link
Copy Markdown
Contributor

Yes, OnPlayer(Enter/Exit)Vehicle called for train carriages when player press F key to enter them by himself, just like with any other vehicles.

@AmyrAhmady
AmyrAhmady force-pushed the train-passenger-fix branch from 553010a to 99d3d6e Compare July 12, 2025 10:49
uifdev and others added 4 commits July 12, 2025 14:41
Update vehicles_impl.hpp

Update vehicles_impl.hpp

Update vehicles_impl.hpp

Update vehicle.hpp

Update vehicles_impl.hpp

Update vehicle.hpp

Update vehicle.hpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants