diff --git a/NewHorizons/External/Configs/StarSystemConfig.cs b/NewHorizons/External/Configs/StarSystemConfig.cs
index 5d3963aa..99394c81 100644
--- a/NewHorizons/External/Configs/StarSystemConfig.cs
+++ b/NewHorizons/External/Configs/StarSystemConfig.cs
@@ -56,11 +56,17 @@ namespace NewHorizons.External.Configs
public SkyboxModule Skybox;
///
- /// Set to `true` if you want to spawn here after dying, not Timber Hearth. You can still warp back to the main star
+ /// Set to `true` if you want to spawn here after dying, not Timber Hearth. You can still warp back to the main star.
/// system.
///
public bool startHere;
+ ///
+ /// Set to `true` if you want the player to stay in this star system if they die in it.
+ /// system.
+ ///
+ public bool respawnHere;
+
[Obsolete("travelAudioClip is deprecated, please use travelAudio instead")]
public string travelAudioClip;
@@ -238,7 +244,7 @@ namespace NewHorizons.External.Configs
// False by default so if one is true go true
mapRestricted = mapRestricted || otherConfig.mapRestricted;
- mapRestricted = mapRestricted || otherConfig.mapRestricted;
+ respawnHere = respawnHere || otherConfig.respawnHere;
startHere = startHere || otherConfig.startHere;
Vessel = Vessel == null ? otherConfig.Vessel : Vessel;
diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs
index c8ff5c12..93e4ed9c 100644
--- a/NewHorizons/Main.cs
+++ b/NewHorizons/Main.cs
@@ -819,18 +819,17 @@ namespace NewHorizons
// We reset the solar system on death
if (!IsChangingStarSystem)
{
+ if (SystemDict[_currentStarSystem].Config.respawnHere) return;
+
// If the override is a valid system then we go there
if (SystemDict.ContainsKey(_defaultSystemOverride))
{
_currentStarSystem = _defaultSystemOverride;
- IsWarpingFromShip = true; // always do this else sometimes the spawn gets messed up
}
else
{
_currentStarSystem = _defaultStarSystem;
}
-
- IsWarpingFromShip = false;
}
}
#endregion Change star system