mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fixes a bug where the ship wasn't removed from volumes when spawning
This commit is contained in:
parent
d71dc6c22d
commit
61102e25eb
@ -77,6 +77,20 @@ namespace NewHorizons.Handlers
|
|||||||
}
|
}
|
||||||
|
|
||||||
SpawnBody(ship.GetAttachedOWRigidbody(), SpawnPointBuilder.ShipSpawn, pos);
|
SpawnBody(ship.GetAttachedOWRigidbody(), SpawnPointBuilder.ShipSpawn, pos);
|
||||||
|
|
||||||
|
// Bug affecting mods with massive stars (8600m+ radius)
|
||||||
|
// TH has an orbital radius of 8600m, meaning the base game ship spawn ends up inside the star
|
||||||
|
// This places the ship into the star's fluid volumes (destruction volume and atmosphere)
|
||||||
|
// When the ship is teleported out, it doesn't update it's detected fluid volumes and gets affected by drag forever
|
||||||
|
// Can fix by turning the volumes off and on again
|
||||||
|
foreach (var volume in ship.GetComponentInChildren<ShipFluidDetector>()._activeVolumes)
|
||||||
|
{
|
||||||
|
if (volume.gameObject.activeInHierarchy)
|
||||||
|
{
|
||||||
|
volume.gameObject.SetActive(false);
|
||||||
|
volume.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Main.Instance.CurrentStarSystem != "SolarSystem" && !Main.Instance.IsWarpingFromShip)
|
else if (Main.Instance.CurrentStarSystem != "SolarSystem" && !Main.Instance.IsWarpingFromShip)
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
||||||
"name": "New Horizons",
|
"name": "New Horizons",
|
||||||
"uniqueName": "xen.NewHorizons",
|
"uniqueName": "xen.NewHorizons",
|
||||||
"version": "1.18.3",
|
"version": "1.18.4",
|
||||||
"owmlVersion": "2.9.8",
|
"owmlVersion": "2.9.8",
|
||||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user