Skip to content

[fix] atv: gate InpActEvt_use on occupantSlot to prevent multi-driver desync - #9

Open
arigalit wants to merge 2 commits into
VOTV-MP:mainfrom
arigalit:main
Open

[fix] atv: gate InpActEvt_use on occupantSlot to prevent multi-driver desync#9
arigalit wants to merge 2 commits into
VOTV-MP:mainfrom
arigalit:main

Conversation

@arigalit

Copy link
Copy Markdown

Summary

When a second peer mounts an ATV while another player is already driving, both engines run vehicle physics and fight over transform authority, causing severe desync. This gates ATV interaction to a single occupant.

Details

  • atv_sync: Track incoming occupantSlot in AtvEntry and expose IsOccupiedByOther(actor, &slot).
  • device_occupancy: In OnUseInputPre, detect when the aimed actor is an AATV_C occupied by another peer. Call DS::ClearAimForDispatch() so the native seating logic never runs.
  • Feedback: In OnUseInputPost, fire the standard deny click sound and push the "<Player> is using the ATV" notice to the chat feed.
  • Dismount: Drivers still pass the gate cleanly (occupantSlot == LocalSlot()) and release vehicle authority on exit.

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.

1 participant