From c3b555c8f3948abed98cb8665afe7fad4e8ff1c3 Mon Sep 17 00:00:00 2001 From: InvalidArgument3 Date: Sat, 19 Oct 2024 04:13:33 -0500 Subject: [PATCH] ug --- .../Data/Scripts/WarpDrive/WarpSystem.cs | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Slipspace Engine/Data/Scripts/WarpDrive/WarpSystem.cs b/Slipspace Engine/Data/Scripts/WarpDrive/WarpSystem.cs index 0f48d254..a6f3c159 100644 --- a/Slipspace Engine/Data/Scripts/WarpDrive/WarpSystem.cs +++ b/Slipspace Engine/Data/Scripts/WarpDrive/WarpSystem.cs @@ -1327,11 +1327,6 @@ private List GetActiveWarpDrives() public void Dewarp(bool Collision = false) { - // Ensure this is only run on the server (dedicated or host) to avoid multiple executions - if (!(MyAPIGateway.Multiplayer.IsServer || MyAPIGateway.Utilities.IsDedicated)) - { - return; - } // Check if we've been in warp for more than 1 minute (assuming 60 updates per second) if (WarpState == State.Active && @@ -1348,15 +1343,21 @@ public void Dewarp(bool Collision = false) ? MyColorPickerConstants.HSVOffsetToHSV(faction.CustomColor).HSVtoColor() : Color.Black; // Default color if no faction - // Only the server or dedicated server adds the GPS marker once, visible to all players - MyVisualScriptLogicProvider.AddGPSForAll( - "Slipspace™ Exit Signature", - "A ship has exited slipspace™ here!", - exitPosition, - gpsColor, - 30); + // Ensure this is only run on the server (dedicated or host) to avoid multiple executions + if (!(MyAPIGateway.Multiplayer.IsServer || MyAPIGateway.Utilities.IsDedicated)) + { + // Only the server or dedicated server adds the GPS marker once, visible to all players + MyVisualScriptLogicProvider.AddGPSForAll( + "Slipspace™ Exit Signature", + "A ship has exited slipspace™ here!", + exitPosition, + gpsColor, + 30); + }; } + + if (PlayersInWarpList.Count > 0) { foreach (var Player in PlayersInWarpList)