-
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
Action Group Brakes gets locked out if Time is moved backwards with Hyperedit. #240
Comments
This isn't specific to brakes. All action groups store the last UTC where they were toggled and if it's in the future then you can't toggle it again. We ran into this in TPKSP when I tried to reset the universe clock due to floating point imprecision when it got too high. Not really sure why the code works like that, but we'd need to understand it before fixing it. |
I'd say that in general, trying to move time backward is likely to cause various issues, both in stock and in mods. Is this really worth a fix ? |
If it looks safe, sure. I don’t recall any other symptoms after resetting the clock (though of course I can’t rule out problems in mods I wasn’t using). |
I haven't seen any issues occur either. I don't use it for normal gameplay, it doesn't matter there, but for testing of configurations and mods that affect the environment, it's quite useful. |
Yeah the bigger problem is that once UTC exceeds 1200 (stock) years or so, things start falling apart. It might be interesting to do something in KSPCF to address that more generally (sounds hard, but sure would be nice). Resetting UTC is just one way to work around the problem, but the action group issue can really break vessels in flight and it seems like it should be easy to fix as long as there's no negative side effects. |
Even if we take the time to do a comprehensive review and fix of the stock code (I wouldn't dare declare "this is now fine" just because we fixed the one obvious issue), we still can't assume that mods won't rely on UT advancing predictably. If the use case is for testing / debugging, this feels like a lot of work for an ultra-niche feature, and if Hyperedit has a "change UT" feature, it should be its responsibility to do it without side effects. As for stuff breaking when UT get past some value, that's an entirely different issue. It might indeed be worth exploring what exactly is breaking and potential solutions. |
Provide a description of the KSP bug or improvement
I often use Hyperedit's Set Time feature to e.g. compare how a TUFX config looks at day and night, or to achieve a specific cloud pattern with EVE. However, if time is set backwards from current game time instead of forwards (e.g. setting time from 14,000 to 0) causes the brakes action group to become locked.
The toggle button on screen becomes unclickable and pressing the action group hotkey also does not work.
Only pressing the action group hotkey triggers a message in the log though:
Cannot toggle Brakes. 16469.5 seconds until it becomes available again
I am guessing some sort of rate-limiting code for the Brakes is responsible for this issue. I seem to remember this used to also be an issue with lights and gear, however those remain unaffected in ksp 1.12.5.
Another possible explanation for the issue may be that brakes is an action group that requires the hotkey to be held down, it is momentary instead of toggle, which may have required some different handling in code.
Personally I think this code should not even be present, I have never experienced a point in gameplay where quickly toggling brakes twice has caused any issues.
The text was updated successfully, but these errors were encountered: