From 2ddea8ac8dd07e9e0a1d23e91c4ac1fe213a6b7d Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 12 Feb 2023 00:28:55 +0100 Subject: Removed RandomSpawner from BaseBattle instance --- sim/src/BaseBattle.cpp | 5 +++-- sim/src/BaseBattle.h | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sim') diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 6182fec..fa91134 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -16,6 +16,7 @@ #include #include "Builder.h" +#include "RandomSpawner.h" namespace kurator @@ -25,9 +26,9 @@ namespace sim BaseBattle::BaseBattle(const campaign::Scenario& scenario) : - _registry {}, - spawner {scenario.last_team(), scenario.radius, 0.1} + _registry {} { + RandomSpawner spawner {scenario.last_team(), scenario.radius, 0.1}; Builder build {_registry, spawner}; for (const auto& ship : scenario.ships) { const auto entity = build(ship.loadout.type, ship.team); diff --git a/sim/src/BaseBattle.h b/sim/src/BaseBattle.h index 7532dd8..77e1d10 100644 --- a/sim/src/BaseBattle.h +++ b/sim/src/BaseBattle.h @@ -7,7 +7,6 @@ #include #include -#include "RandomSpawner.h" #include "TeamManager.h" @@ -27,7 +26,6 @@ public: private: entt::registry _registry; entt::dispatcher _dispatcher; - RandomSpawner spawner; TeamManager manager; void pick_random_targets(); }; -- cgit v1.1