Skip to content

Commit

Permalink
Fixed softlock due to stars being too far(#306) (#306)
Browse files Browse the repository at this point in the history
* Fixed softlock due to stars being too far(#305)

That^

* Fixed softlock due to stars being too far(#305)

That^
  • Loading branch information
Duraj1 authored Apr 20, 2024
1 parent f02a295 commit 6063eb3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Content.Server/_FTL/FTLPoints/Systems/FtlPointsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ public MapId GenerateSector(int maxStars, MapId? startingPoint, bool clear = fal
var mapId = GeneratePoint(prototype);
var mapUid = _mapManager.GetMapEntityId(mapId);
var position = new Vector2(
origin.X + _random.NextFloat(6, 8.5f),
origin.Y + _random.NextFloat(6, 8.5f)
origin.X + _random.NextFloat(6, 6.5f),
origin.Y + _random.NextFloat(6, 6.5f)
);
if (first)
{
position = new Vector2(
origin.X + GenerateVectorWithRandomRadius(3, 5),
origin.Y + GenerateVectorWithRandomRadius(3, 5)
origin.X + GenerateVectorWithRandomRadius(3, 4),
origin.Y + GenerateVectorWithRandomRadius(3, 4)
);
}
TryAddPoint(mapId, position, MetaData(mapUid).EntityName);
Expand All @@ -151,8 +151,8 @@ public MapId GenerateSector(int maxStars, MapId? startingPoint, bool clear = fal
var mapId = GeneratePoint(prototype);
var mapUid = _mapManager.GetMapEntityId(mapId);
var position = new Vector2(
origin.X + GenerateVectorWithRandomRadius(5, 7),
origin.Y + GenerateVectorWithRandomRadius(5, 7)
origin.X + GenerateVectorWithRandomRadius(5, 6),
origin.Y + GenerateVectorWithRandomRadius(5, 6)
);
TryAddPoint(mapId, position, MetaData(mapUid).EntityName);
latestGeneration.Add(position);
Expand Down

0 comments on commit 6063eb3

Please sign in to comment.