summaryrefslogtreecommitdiff
path: root/sim/src/BaseBattle.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-02-11 17:26:49 +0100
committerAki <please@ignore.pl>2023-02-11 17:26:49 +0100
commita5266d3e5da1d9ee9f873124674c68843a407ac0 (patch)
tree18a91419c4bdf37e7333a17bfb804e53fb92764a /sim/src/BaseBattle.cpp
parente66011756340e03fe941723f762119ed78ec2402 (diff)
downloadkurator-a5266d3e5da1d9ee9f873124674c68843a407ac0.zip
kurator-a5266d3e5da1d9ee9f873124674c68843a407ac0.tar.gz
kurator-a5266d3e5da1d9ee9f873124674c68843a407ac0.tar.bz2
Context is now used in sim systems
Diffstat (limited to 'sim/src/BaseBattle.cpp')
-rw-r--r--sim/src/BaseBattle.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp
index 3e3815c..e34af76 100644
--- a/sim/src/BaseBattle.cpp
+++ b/sim/src/BaseBattle.cpp
@@ -5,6 +5,7 @@
#include <entt/entity/registry.hpp>
#include <entt/signal/dispatcher.hpp>
+#include <kurator/engine/Context.h>
#include <kurator/campaign/Scenario.h>
#include <kurator/sim/components.h>
#include <kurator/sim/events.h>
@@ -57,13 +58,13 @@ BaseBattle::dispatcher()
void
-BaseBattle::update(const float dt)
+BaseBattle::update(engine::Context& ctx)
{
- time += dt;
+ time = ctx.clock.game;
pick_random_targets();
keep_at_range();
- update<FloatingMovement>(dt);
- update<TurretControl>(dt);
+ FloatingMovement::update(ctx);
+ TurretControl::update(ctx);
kill_off_dead();
manager.clear(_registry); // registry supports on destructions events
manager.update(_dispatcher);