Skip to content
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

Fix #251: Fix stock code that fails to limit timewarp when approaching a SOI transition #259

Merged
merged 5 commits into from
Oct 12, 2024

Conversation

JonnyOThan
Copy link
Contributor

No description provided.

gotmachine and others added 4 commits September 25, 2024 20:08
-limit warp levels when approaching SOI transitions
-this seems to work pretty well, but also slows down a LOT more than it really needs to; needs tuning
@JonnyOThan JonnyOThan marked this pull request as draft October 9, 2024 21:44
@JonnyOThan
Copy link
Contributor Author

This works pretty well, but I want to test with alarms as well

@JonnyOThan JonnyOThan changed the title Fix #251: Fix stock code that limits timewarp when approaching a SOI transition Fix #251: Fix stock code that fails to limit timewarp when approaching a SOI transition Oct 9, 2024
@JonnyOThan
Copy link
Contributor Author

seems good.

@JonnyOThan JonnyOThan marked this pull request as ready for review October 9, 2024 21:53
@gotmachine
Copy link
Contributor

gotmachine commented Oct 11, 2024

It shall be noted that this fix only works if "ORBIT_WARP_DOWN_AT_SOI" is true in settings.cfg. There is no UI for that setting, so probably not a big deal.

Other than that, there is still the issue that the stock "stop warp on trajectory crashes into body" implementation is reliant on the configured per-body altitude limits being adequately set (including for rescaled/modded bodies) for the max time warp rate (which can be vastly higher than stock in mods). Ideally, it would nice to put together a revamp of the whole logic using sensible altitude defaults and relying on checking against the intersection UT instead of against the altitude at discrete points, which in any case is giving extremely inconsistent results in terms of at which altitude a given warp rate will be effectively engaged.

@JonnyOThan
Copy link
Contributor Author

Right...I think I'll play around with WarpEverywhere to construct a repro case and make sure your patch (or something similar) works there.

@gotmachine
Copy link
Contributor

To be clear, I think your patch is good enough. It effectively fixes the main practical issue the we ended up identifying, going though a body lying in the next SOI. The rest are likely more theoretical issues than practical ones.

@gotmachine gotmachine merged commit 78a62a9 into dev Oct 12, 2024
1 check passed
JonnyOThan added a commit that referenced this pull request Oct 14, 2024
…g a SOI transition (#259)

- Fix warp rate not being always limited correctly when approaching SOI transitions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants