Probably fixes #748 resets landing pad sensor contact bodies

This commit is contained in:
Nick 2024-02-03 14:13:32 -05:00
parent 61102e25eb
commit 6a2ef64a30

View File

@ -76,6 +76,13 @@ namespace NewHorizons.Handlers
pos += SpawnPointBuilder.ShipSpawn.transform.TransformDirection(SpawnPointBuilder.ShipSpawnOffset); pos += SpawnPointBuilder.ShipSpawn.transform.TransformDirection(SpawnPointBuilder.ShipSpawnOffset);
} }
// #748 Before moving the ship, reset all its landing pad sensors
// Else they might think its still touching TH
foreach (var landingPadSensor in ship.GetComponentsInChildren<LandingPadSensor>())
{
landingPadSensor._contactBody = null;
}
SpawnBody(ship.GetAttachedOWRigidbody(), SpawnPointBuilder.ShipSpawn, pos); SpawnBody(ship.GetAttachedOWRigidbody(), SpawnPointBuilder.ShipSpawn, pos);
// Bug affecting mods with massive stars (8600m+ radius) // Bug affecting mods with massive stars (8600m+ radius)