Skip to content

Commit

Permalink
Dynamic gps cant be deleted anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
8vogt committed Feb 19, 2021
1 parent b776c63 commit 33a70a4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions SEWorldGenPlugin/Session/MyGPSManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ public bool AddDynamicGps(string name, Color color, Vector3D pos, long playerId,
{
Tuple<Guid, long> key = new Tuple<Guid, long>(id, playerId);

if (m_dynamicGpss.ContainsKey(key)) return false;
if (m_dynamicGpss.ContainsKey(key))
{
RemoveDynamicGps(playerId, id);
}
MyGps gps = new MyGps
{
Name = name,
Expand Down Expand Up @@ -202,7 +205,12 @@ public bool DynamicGpsExists(Guid id, long playerId)
{
Tuple<Guid, long> key = new Tuple<Guid, long>(id, playerId);

return m_dynamicGpss.ContainsKey(key);
if (m_dynamicGpss.ContainsKey(key))
{
return MySession.Static.Gpss[playerId].ContainsKey(m_dynamicGpss[key]);
}

return false;
}

/// <summary>
Expand Down

0 comments on commit 33a70a4

Please sign in to comment.