Skip to content

Commit

Permalink
ug
Browse files Browse the repository at this point in the history
  • Loading branch information
InvalidArgument3 committed Oct 19, 2024
1 parent 3d2a927 commit c3b555c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions Slipspace Engine/Data/Scripts/WarpDrive/WarpSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1327,11 +1327,6 @@ private List<IMyFunctionalBlock> 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 &&
Expand All @@ -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)
Expand Down

0 comments on commit c3b555c

Please sign in to comment.