From a5266d3e5da1d9ee9f873124674c68843a407ac0 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 11 Feb 2023 17:26:49 +0100 Subject: Context is now used in sim systems --- sim/src/BaseBattle.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sim/src/BaseBattle.cpp') 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 #include +#include #include #include #include @@ -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(dt); - update(dt); + FloatingMovement::update(ctx); + TurretControl::update(ctx); kill_off_dead(); manager.clear(_registry); // registry supports on destructions events manager.update(_dispatcher); -- cgit v1.1