Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarPlayerUniverseMap.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-18 17:37:43 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-18 17:37:43 +1100
commit647cd45dd5f1594d17bad1ba940796b44403712a (patch)
tree926b3657999ff2006b78545deb8b8287ff3f5682 /source/game/StarPlayerUniverseMap.cpp
parent5d1e118a19fe681ab3ce409eb337a114f986d912 (diff)
Update StarPlayerUniverseMap.cpp
Diffstat (limited to 'source/game/StarPlayerUniverseMap.cpp')
-rw-r--r--source/game/StarPlayerUniverseMap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/game/StarPlayerUniverseMap.cpp b/source/game/StarPlayerUniverseMap.cpp
index 9076ad5..2f911ea 100644
--- a/source/game/StarPlayerUniverseMap.cpp
+++ b/source/game/StarPlayerUniverseMap.cpp
@@ -149,11 +149,13 @@ HashMap<Uuid, PlayerUniverseMap::MappedObject> PlayerUniverseMap::mappedObjects(
}
void PlayerUniverseMap::addMappedCoordinate(CelestialCoordinate const& coordinate) {
- if (coordinate.isNull() || coordinate.isSystem())
+ if (coordinate.isNull())
return;
auto& universeMap = m_universeMaps[*m_serverUuid];
- universeMap.systems[coordinate.location()].mappedPlanets.add(coordinate.planet());
+ auto& systemMap = universeMap.systems[coordinate.location()];
+ if (!coordinate.isSystem())
+ systemMap.mappedPlanets.add(coordinate.planet());
}
void PlayerUniverseMap::addMappedObject(CelestialCoordinate const& system, Uuid const& uuid, String const& typeName, Maybe<CelestialOrbit> const& orbit, JsonObject parameters) {