Closed tritonas00 closed 1 year ago
It can be spammy though, especially with that amount of flares
It can be spammy though, especially with that amount of flares
in that case just check m_headlights_on
and don't call toggleLights()
if already on. Throwing that many exceptions isn't good for FPS.
EDIT: apparently we have something broken somewhere because the state of m_headlights_on
is desynchronized with the actual OGRE flares.
Purpose: to fix a crash (unhandled exception). Apparently there's a bug in synchronizing light states between player vehicle and attached vehicles (trailers etc...).
Estimate: To fix correctly, wait for #2937 to be done - it completely overhauls the light state system, and fixes this in the process. For a dirty workaround suggested by Tritonas, 1 man day should be enough.
https://forum.rigsofrods.org/resources/coca-cola-t600-dry-van-trailer.86/
Load trailer, press N to open lights Load the truck, press L to lock with the trailer and press N, it tries to re attach trailer's flares (because main vehicle lights trigger trailer lights also) so crash: