diff --git a/Source/Pad/Launchpad.cs b/Source/Pad/Launchpad.cs index 02ae787c..53b7a0d3 100644 --- a/Source/Pad/Launchpad.cs +++ b/Source/Pad/Launchpad.cs @@ -334,5 +334,20 @@ public void OnRename () { ELBuildWindow.updateCurrentPads (); } + + void OnCollisionStay (Collision collision) + { + // force any vessels landed on the pad to share the same situation + // works around a bug in KSP that sometimes glitches the landed + // vessel to not-landed + Part p = FlightGlobals.GetPartUpwardsCached (collision.collider.gameObject); + if (p != null) { + if (vessel.LandedOrSplashed) { + p.vessel.Landed = vessel.Landed; + p.vessel.Splashed = vessel.Splashed; + p.vessel.SetLandedAt (vessel.landedAt, null, vessel.displaylandedAt); + } + } + } } }