From: Mikko Rasa Date: Wed, 7 Dec 2022 10:03:35 +0000 (+0200) Subject: Adjust system dependencies to resolve scheduling ambiguities X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8420959665d2a2cfeed3e50dc0d706b9b7570414;p=libs%2Fgame.git Adjust system dependencies to resolve scheduling ambiguities --- diff --git a/examples/bassteroids/source/damagedealer.cpp b/examples/bassteroids/source/damagedealer.cpp index 7c8e873..a788787 100644 --- a/examples/bassteroids/source/damagedealer.cpp +++ b/examples/bassteroids/source/damagedealer.cpp @@ -2,6 +2,7 @@ #include #include "collider.h" #include "hittable.h" +#include "physics.h" using namespace Msp; @@ -11,6 +12,7 @@ DamageDealer::DamageDealer(Game::Stage &s): { declare_dependency(UPDATE); declare_dependency(READ_OLD); + declare_dependency(RUN_AFTER); observer.observe([this](auto &e){ collision(e); }); } diff --git a/examples/bassteroids/source/physics.cpp b/examples/bassteroids/source/physics.cpp index 158b745..5ce3528 100644 --- a/examples/bassteroids/source/physics.cpp +++ b/examples/bassteroids/source/physics.cpp @@ -12,7 +12,7 @@ Physics::Physics(Game::Stage &s): observer(stage.get_event_bus()) { declare_dependency(UPDATE); - declare_dependency(UPDATE); + declare_dependency(CHAINED_UPDATE); declare_dependency(READ_OLD); observer.observe([this](auto &e){ entity_added(e); });