summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-02-12 00:28:55 +0100
committerAki <please@ignore.pl>2023-02-12 00:28:55 +0100
commit2ddea8ac8dd07e9e0a1d23e91c4ac1fe213a6b7d (patch)
tree7df3fcde712ea7687f3ffeed4850d49175b341b6
parent9e6555c0f3be53d65496b442c4a60c2592fe4f97 (diff)
downloadkurator-2ddea8ac8dd07e9e0a1d23e91c4ac1fe213a6b7d.zip
kurator-2ddea8ac8dd07e9e0a1d23e91c4ac1fe213a6b7d.tar.gz
kurator-2ddea8ac8dd07e9e0a1d23e91c4ac1fe213a6b7d.tar.bz2
Removed RandomSpawner from BaseBattle instance
-rw-r--r--sim/src/BaseBattle.cpp5
-rw-r--r--sim/src/BaseBattle.h2
2 files changed, 3 insertions, 4 deletions
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 <kurator/universe/UniqueIdentifier.h>
#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 <kurator/campaign/Scenario.h>
#include <kurator/sim/Battle.h>
-#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();
};