Skip to content

Commit

Permalink
Only add persistent gps, when sphere is actually there
Browse files Browse the repository at this point in the history
  • Loading branch information
8vogt committed Feb 20, 2021
1 parent 5d167c0 commit 43893bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SEWorldGenPlugin/Generator/MyStarSystemGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ private void AddAllPersistentGps()
MyAbstractAsteroidObjectProvider provider = null;
if (MyAsteroidObjectsManager.Static.AsteroidObjectProviders.TryGetValue(asteroid.AsteroidTypeName, out provider))
{
MyGPSManager.Static.AddPersistentGps(item.DisplayName, RING_GPS_COLOR, provider.GetAsteroidObjectShape(asteroid).GetPointInShape(), item.Id);
var shape = provider.GetAsteroidObjectShape(asteroid);

if (shape == null) break;

MyGPSManager.Static.AddPersistentGps(item.DisplayName, RING_GPS_COLOR, shape.GetPointInShape(), item.Id);
}
}
break;
Expand Down

0 comments on commit 43893bf

Please sign in to comment.