My mod Railway Motor Car creates a locomotive at the players' position on demand and automatically enters it via entity.set_driver (scripts/use_equipment.lua:113).
If a (spider-)vehicle with allow_passengers=false is standing above the player, the player is ejected from the locomotive
The log shows multiple calls of events.on_player_driving_changed_state (entered and ejected), but since only a shrinked stack trace is shown, I cannot resolve this by myself.
There is no issue if the other vehicle is further away, see
Multiple calls of on_player_driving_changed_state on set_driver
Multiple calls of on_player_driving_changed_state on set_driver
- Attachments
-
- allow_passengers_bug.zip
- (1.18 MiB) Downloaded 50 times
Re: [1.1.87] Multiple calls of on_player_driving_changed_state on set_driver
Thanks for the report. That is working correctly. The issue you're having is:
* You made a custom hotkey to react when the toggle-driving hotkey is pressed
* When it's pressed your hotkey runs and you put the player in a vehicle
* The game's version of toggle-driving runs and sees "the player is in a vehicle; I should leave the vehicle"
The reason it only happens when near the other not-drivable vehicle is the game won't send the normal toggle-driving action if there isn't at least a vehicle somewhere near the player.
* You made a custom hotkey to react when the toggle-driving hotkey is pressed
* When it's pressed your hotkey runs and you put the player in a vehicle
* The game's version of toggle-driving runs and sees "the player is in a vehicle; I should leave the vehicle"
The reason it only happens when near the other not-drivable vehicle is the game won't send the normal toggle-driving action if there isn't at least a vehicle somewhere near the player.
If you want to get ahold of me I'm almost always on Discord.
Re: Multiple calls of on_player_driving_changed_state on set_driver
Yes, I had to modify the logic because the Steam-Release of 1.1.87 (1.1.80 - 1.1.87) broke my mod - see Version 0.4.0.
Possibly due to 106663.
Should I file a bug report for this?
Possibly due to 106663.
Should I file a bug report for this?
Re: Multiple calls of on_player_driving_changed_state on set_driver
I have no idea what you're referring to so I have no idea if there's anything bugged or not.
If you want to get ahold of me I'm almost always on Discord.