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

Driveby state desync when player gets jacked #3047

Open
1 task done
bum8hj opened this issue May 25, 2023 · 0 comments
Open
1 task done

Driveby state desync when player gets jacked #3047

bum8hj opened this issue May 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bum8hj
Copy link
Contributor

bum8hj commented May 25, 2023

Describe the bug

When an on-foot player tries to jack a vehicle from an occupant who is doing Driveby, but fails to actually kick the occupant out of the vehicle, the following happens:

  • for the on-foot player, the occupant puts his head back in the vehicle (stops doing Driveby)
  • for the on-foot player, isPedDoingGangDriveby(occupant) returns false
  • for the vehicle occupant, their head is still out of the vehicle (still doing Driveby)
  • server side isPedDoingGangDriveby(occupant) returns true

Steps to reproduce

  1. Enter vehicle as Player A
  2. Enter Driveby mode
  3. Attempt to jack Player A's vehicle as Player B but cancel it (move away)
  4. As Player B, observe how Player A's head goes back inside
  5. As player A, notice how your head is still outside and you are still doing Driveby

Version

Clients: v1.5.9-release-21643

Additional context

Probably caused by this code: CNetAPI.cpp #1526

I believe this happens because the action of being jacked doesn't verify whether the jacked player (pause) actually gets removed from the vehicle or if the action fails.

Temporary solutions

  1. Make the vehicle occupant exit the vehicle and re-enter it.
    Making the vehicle occupant toggle Driveby does not sync/fix the state for the on-foot player.
  2. Doing setPedDoingGangDriveby(occupant, false) then setPedDoingGangDriveby(occupant, true) server side will sync/fix it
    Doing the above client side does not sync/fix it

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@bum8hj bum8hj added the bug Something isn't working label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant