Skip to content

Conversation

Serius41
Copy link
Contributor

@Serius41 Serius41 commented Sep 5, 2025

Fix IsPedInVehicle synchronization issue between server and client

  • Server was returning true for IsPedInVehicle when ped was only trying to enter vehicle
  • Client correctly returned false until ped was actually in vehicle
  • Added check for VEHICLEACTION_NONE to ensure ped is actually in vehicle
  • Fixes desync where server reported ped as in vehicle during entry process

Fixes issue where setPedEnterVehicle would cause server-side IsPedInVehicle
to return true before ped actually entered the vehicle, while client-side
correctly returned false until ped was physically in the vehicle.

bug:
11

fixed:
22

isPedInVehicle was returning true on the server side even if the ped was not in the vehicle. Here we had to check if there was a groove in the vehicle, and the values ​​were returning differently between the client and server.
@Serius41 Serius41 changed the title Update CLuaPedDefs.cpp Fix IsPedInVehicle synchronization issue between server and client Sep 5, 2025
@FileEX FileEX added backwards-incompatible Should be merged after the release of 1.7.1 bugfix Solution to a bug of any kind labels Sep 5, 2025
@FileEX
Copy link
Member

FileEX commented Sep 5, 2025

Hmmm...
image

Is this a side effect (bug) or an intended effect? It seems to me that on the server side it should work the same way as on the client side.

Related #3830

@FileEX FileEX added the feedback Further information is requested label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompatible Should be merged after the release of 1.7.1 bugfix Solution to a bug of any kind feedback Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants