[CHANGED] Removed physics warp restriction to lossless physics #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey !
While experimenting with this mod and the lossless physics, I found that the lossless physics does not work while in physics warp. I believe this is unintended and that the lossless physic should work while in physics warp.
After a bit of investigation, I found that this issue occur because the mod check
TimeWarp.fetch.Mode == TimeWarp.Modes.HIGHbefore changingfixedDeltaTimeand I think thatTimeWarp.Modes.HIGHmean "rail warp".By removing that check from the condition before updating
fixedDeltaTime, the lossless physic is applied regardless of if we are in physics warp or rail warp.One potential side effect of that change is that the game smoothly change the
fixedDeltaTimewhen changing the game's speed and that smoothing may override the mod for the duration of that smoothing. Once the smoothing is done, the mod scales the physic properly. Aside from that, I found that this change reduce the effect of the "warp kraken", especially when using a rover.I am very new to KSP modding, please let me know if this PR is a bad idea/not a bug fix.
Cheers !