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 bug where vessels can remain in situation Splashed. #44

Merged
merged 2 commits into from
Jun 25, 2022

Conversation

NathanKell
Copy link
Contributor

This does two things:

  • A vessel that spawns splashed will stay in prelaunch until it is moving at > 1m/s (like how a landed vessel will stay in prelaunch until it is moving >2.5m/s). Normally splashed clobbers prelaunch, which is Bad, especiallby because:
  • Fix bug where a vessel can never go unsplashed if it loses its splashed parts. The only way for something to lose splashedness in stock is for all splashed parts to lose contact with water, but if the vessel loses (decouples or they die) splashed parts, its splashed bool is never reset (the splashed check, like the landed check, is event driven rather than polled).

Note this all is slightly confusing because there is both a vessel state (SPLASHED, PRELAUNCH, FLYING, etc) and the bool vessel.Splashed (like vessel.Landed) which says whether any parts are splashed.

…it can never become unsplashed). Also fixes splashed overriding prelaunch.
@NathanKell
Copy link
Contributor Author

This has now been tested in the RO discord by users who did have the bug (and by me, though I could never repro the bug >.> but at least it doesn't hurt anything for me) and seems to work fine.

@gotmachine gotmachine merged commit 307fa6b into KSPModdingLibs:dev Jun 25, 2022
gotmachine added a commit that referenced this pull request Jun 25, 2022
- New KSP bugfix : [StickySplashedFixer](#44) (@NathanKell)
- New modding bugfix : [DepartmentHeadImage](#47) (@NathanKell)
- PersistentIConfigNode patch : added `Guid` serialization support to `CreateObjectFromConfig()`, `LoadObjectFromConfig()` and `CreateConfigFromObject()` methods (@NathanKell).
gotmachine added a commit that referenced this pull request Jan 30, 2023
- New KSP bugfix : [StickySplashedFixer](#44) (@NathanKell)
- New modding bugfix : [DepartmentHeadImage](#47) (@NathanKell)
- PersistentIConfigNode patch : added `Guid` serialization support to `CreateObjectFromConfig()`, `LoadObjectFromConfig()` and `CreateConfigFromObject()` methods (@NathanKell).
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.

None yet

2 participants