From 27216f78d7a08ffd14ad7040f76c8078ecdfd993 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 2 Jan 2023 00:47:48 +0100 Subject: Moved UniqueIdentifier to universe module --- sim/src/BaseBattle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sim') diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 14a9ccd..17df990 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -14,6 +13,7 @@ #include #include #include +#include #include "Builder.h" @@ -33,7 +33,7 @@ BaseBattle::BaseBattle(const campaign::Scenario& scenario) : Builder build {_registry, spawner}; for (const auto& ship : scenario.ships) { const auto entity = build(repo->ship_type(ship.type), ship.team); - _registry.emplace(entity, ship.identifier); + _registry.emplace(entity, ship.identifier); auto& state = _registry.get(entity); for (const auto& turret_type : ship.turrets) { auto def = repo->turret_type(turret_type); @@ -105,8 +105,8 @@ BaseBattle::kill_off_dead() for (auto&& [entity, points] : view.each()) { if (points.health > 0.0) continue; - if (_registry.all_of(entity)) { - const auto& [identifier, team] = _registry.get(entity); + if (_registry.all_of(entity)) { + const auto& [identifier, team] = _registry.get(entity); _dispatcher.trigger(stats::ShipLeft{time, identifier, team.id, true}); } _registry.destroy(entity); -- cgit v1.1