summaryrefslogtreecommitdiff
path: root/sim/src/BaseBattle.cpp
diff options
context:
space:
mode:
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);