-
Notifications
You must be signed in to change notification settings - Fork 21
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
FlightIntegratorPerf patch breaks Persistent Rotation during timewarp #277
Comments
This is because we are fixing a KSP inconsistency where the vessel calculated MOI (and angular momentum) was still available on packed vessels, but only when that vessel has previously been unpacked at least once. Meaning that vessels being initially loaded out of unpacking range would have those values set to zero, but vessels going out of packing range or entering non-phys warp would still have access to (stale) values. The stock code is trying to reset those values, but fails to do so due to a silly mistake. For reference, here the KSPCF code where this happens : KSPCommunityFixes/KSPCommunityFixes/Performance/FlightIntegratorPerf.cs Lines 121 to 125 in 42b3f23
and KSPCommunityFixes/KSPCommunityFixes/Performance/FlightIntegratorPerf.cs Lines 209 to 210 in 42b3f23
And for completeness, do note that we are also fixing the same issue for KSPCommunityFixes/KSPCommunityFixes/Performance/FlightIntegratorPerf.cs Lines 203 to 207 in 42b3f23
I'm a bit torn on what to do, TBH. Technically, we are just exposing more consistently a bug in Persistent Rotation, which shouldn't be using those fields while the vessels are packed. In stock, an easy way to reproduce the same PR issue is to launch and teleport two vessels in orbit at a 250m distance from each other (this is easily done with the stock rendezvous cheat, in the "set orbit" tab of the ALT-F12 menu). Make one of the vessels rotate, switch to the other, quick-save and quick-load : the other vessel won't be rotating anymore (you don't even need to engage timewarp), as long as it doesn't get close enough from the active vessel (unpacking range in stock is 200m). And for reference, the problematic code in PR : |
So this is technically not an issue with KSPCF. Maybe I should also notify LGG? He might take a look at it and see if anything can be done. |
Created an issue there, maybe there's something that can be done on PR's side. IF LGG is still active, that is. |
Not sure if it can be fixed, I'll take a look |
Describe your problem with KSPCF : When this patch is active, Persistent Rotation doesn't rotate crafts during timewarp. It resumes rotation after the timewarp stops. When the patch is disabled everything works as it should.
Video of the bug: https://youtu.be/-btIv3-Q63o
KSP version : 1.12.4 with only KSPCF, Persistent Rotation and its dependencies
Link to your
KSP.log
file : https://drive.google.com/file/d/1gOqtxYFgfzef2Nq5nQnipWrmyoHgvM3GThe text was updated successfully, but these errors were encountered: