Only correct spawn velocity when NH is handling spawn (fix archipelago incompat)

This commit is contained in:
xen-42 2025-02-13 08:52:40 -05:00
parent cb64f79c5d
commit 9f5257d087
2 changed files with 8 additions and 5 deletions

View File

@ -71,11 +71,14 @@ namespace NewHorizons.Handlers
// Spawn ship // Spawn ship
Delay.FireInNUpdates(SpawnShip, 30); Delay.FireInNUpdates(SpawnShip, 30);
if (UsingCustomSpawn() || shouldWarpInFromShip || shouldWarpInFromVessel)
{
// Have had bug reports (#1034, #975) where sometimes after spawning via vessel warp or ship warp you die from impact velocity after being flung // Have had bug reports (#1034, #975) where sometimes after spawning via vessel warp or ship warp you die from impact velocity after being flung
// Something weird must be happening with velocity. // Something weird must be happening with velocity.
// Try to correct it here after the ship is done spawning // Try to correct it here after the ship is done spawning
Delay.FireInNUpdates(() => FixVelocity(shouldWarpInFromVessel, shouldWarpInFromShip), 31); Delay.FireInNUpdates(() => FixVelocity(shouldWarpInFromVessel, shouldWarpInFromShip), 31);
} }
}
private static void FixVelocity(bool shouldWarpInFromVessel, bool shouldWarpInFromShip) private static void FixVelocity(bool shouldWarpInFromVessel, bool shouldWarpInFromShip)
{ {

View File

@ -4,7 +4,7 @@
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, Trifid, and friends", "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Trifid, and friends",
"name": "New Horizons", "name": "New Horizons",
"uniqueName": "xen.NewHorizons", "uniqueName": "xen.NewHorizons",
"version": "1.26.0", "version": "1.26.1",
"owmlVersion": "2.12.1", "owmlVersion": "2.12.1",
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "PacificEngine.OW_CommonResources" ], "conflicts": [ "PacificEngine.OW_CommonResources" ],