You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetUniversalTime is supposed to detect when it's invalid and return HighLogic.CurrentGame.UniversalTime but at some point Planetarium started running in the editor which means its check for fetch == null returns false, so it still tries to get UT from its instance. But the instance has the UT from before the last revert, rather than from the current game.
Fix: Make the check fetch == null || HighLogic.LoadedSceneIsEditor. RP-1 has used this check for a long time (with its own wrapper for GetUniversalTime) and it's been fine, but there's plenty of code--including stock code--that assumes GetUniversalTime is correct.
Brought to my attention by KSP-RO/RP-1#2067 (because StrategySystem's Update runs in the editor, because of course it does).
The text was updated successfully, but these errors were encountered:
Update: Gonna ship this patch in RP-1 and let it bake for a week or two before making it in KSPCF. @gotmachine can do it as a transpiler when he has time, I'm just gonna prefix.
GetUniversalTime is supposed to detect when it's invalid and return
HighLogic.CurrentGame.UniversalTime
but at some point Planetarium started running in the editor which means its check forfetch == null
returns false, so it still tries to get UT from its instance. But the instance has the UT from before the last revert, rather than from the current game.Fix: Make the check
fetch == null || HighLogic.LoadedSceneIsEditor
. RP-1 has used this check for a long time (with its own wrapper for GetUniversalTime) and it's been fine, but there's plenty of code--including stock code--that assumes GetUniversalTime is correct.Brought to my attention by KSP-RO/RP-1#2067 (because StrategySystem's Update runs in the editor, because of course it does).
The text was updated successfully, but these errors were encountered: