RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
991 stars 175 forks source link

Paused actor physics resume when switching to another actor #3105

Closed CuriousMike56 closed 1 week ago

CuriousMike56 commented 7 months ago

https://github.com/RigsOfRods/rigs-of-rods/assets/46073351/bc072281-e17c-45ce-9133-5c57becf54e8

Also recently noticed the skeleton debug view disables itself when switching actors, possibly related?

ohlidalp commented 3 months ago

Here is the culprit (and yes, skeletonview related): https://github.com/RigsOfRods/rigs-of-rods/blame/master/source/main/physics/ActorManager.cpp#L745-L746 - it broke in https://github.com/RigsOfRods/rigs-of-rods/commit/9431e1b508575c40498ed9becd8a0385a3b95463 - I needed to reset the paused/skeleton after decoupling from the player vehicle. Doesn't make big sense for paused state but it's important with skeleton view.