Page 1 of 1
[0.15.4] on_player_driving_changed_state does not trigger
Posted: Sat Apr 29, 2017 11:24 pm
by folk
Hi,
I am unsure if this is a bug introduced in 0.15.4 or not, but I think it is;
When the player picks up the vehicle they were in (mines it), on_player_driving_changed_state does not trigger at all.
If he exits the vehicle using the keybinding, it does.
EDIT: Only tested in a singleplayer local game.
Re: [0.15.4] on_player_driving_changed_state does not trigger
Posted: Sun Apr 30, 2017 12:21 am
by folk
It seems to be "broken" in 0.15.3 as well. I can test 0.14 tomorrow.
Perhaps it's not broken at all, and it never did trigger when you picked up your current vehicle.
Re: [0.15.4] on_player_driving_changed_state does not trigger
Posted: Sun Apr 30, 2017 12:32 am
by Rseding91
The driving changed event is not fired in some specific cases like this because the game *must* eject the player from the vehicle and the callbacks could put the player into the vehicle he was just ejected from.
Additionally the event isn't fired when a player logs off either even though he's technically ejected from the vehicle when offline.
It's a limitation of how it has to work to ensure mods don't break normal game behavior.
Re: [0.15.4] on_player_driving_changed_state does not trigger
Posted: Sun Apr 30, 2017 11:23 am
by folk
Alright, thank you! It might be worth mentioning this in the API docs, but it could also just be that it's self-evident to everyone but me, since this "issue" hasn't been raised on the forums before as far as my search could find.