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

Passenger Control: Allow for LVC use / sharing by passenger. #18

Open
TrevorBarns opened this issue Mar 4, 2021 · 6 comments
Open

Passenger Control: Allow for LVC use / sharing by passenger. #18

TrevorBarns opened this issue Mar 4, 2021 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@TrevorBarns
Copy link
Owner

TrevorBarns commented Mar 4, 2021

Allow for players in passenger seat to control LVC. Determine in what capacity they can control the vehicle in its entirety (menu included) or simply the main functions (lights, sirens control).

Unfortunately, this is not as simple as expanding the check for player_is_emerg_driver to allow for passengers as well. This results in the passengers request being played temporarily on the passengers client but shortly after being overridden by the drivers original state. To the driver this appears as minor blips of audio and flashes.

I am hypothesizing that this is a race condition between the driver and passengers client, ever 200 ticks of the main LVC thread it sends the vehicle's states. I am not 100% sure this is the case and am not currently sure the best way of overcoming this without reengineering the system.

@TrevorBarns TrevorBarns added enhancement New feature or request help wanted Extra attention is needed labels Mar 4, 2021
@JakeRyan1
Copy link

I know Wolfknight just released dual passenger and driver radars, maybe you can check that out and see what he did to accomplish it. I just came across your updated LVC and haven't looked through your code yet but wolf knights script could get you started in the right direction.

@FactionPvP
Copy link

FactionPvP commented Aug 21, 2021

On the original version of LVC I was able to have the passenger manage the lights. I am willing to help you out with this if you are interested.

@TrevorBarns
Copy link
Owner Author

Little update, after looking at this problem again I solved the siren issue I was running into (I think). However, the lights are not syncing using SetVehicleSirens, airhorn / manu state are not synced correct, and the HUD states are not updated.

Basically the passenger can toggle siren and change tones but thats about it.

@ScottUK
Copy link

ScottUK commented Jan 20, 2022

Little update, after looking at this problem again I solved the siren issue I was running into (I think). However, the lights are not syncing using SetVehicleSirens, airhorn / manu state are not synced correct, and the HUD states are not updated.

Basically the passenger can toggle siren and change tones but thats about it.

You need to get the network owner of the vehicle, like this:

Passanger:
Get vehicle player is in -> Make sure player is in passenger seat -> Get vehicle network owner -> Send server event with their server id -> Send client event back to network owner -> Update things from there.

Otherwise things won't work properly. :)

@Rqver
Copy link

Rqver commented May 4, 2022

Any update on this? Would be super cool to have.

@FirefighterKyle
Copy link

Thanks for all the hard work you do, I hope to see passengers able to turn on lights and sirens with changing tones. For sure, would be nice to allow the driver to just focus on driving. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants