Skip to content

Commit

Permalink
Merge pull request #153 from InvalidArgument3/initialversion
Browse files Browse the repository at this point in the history
ug
  • Loading branch information
InvalidArgument3 authored Oct 19, 2024
2 parents 3da48b2 + c3b555c commit dd40264
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 dd40264

Please sign in to comment.