diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-07 15:35:42 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-07 15:35:42 +0100 |
commit | 278e81b4ab039802ced33810aef640e61f1ab47a (patch) | |
tree | 9c59c4c8ff8898c47f79873d7f325330ef9b192a /src | |
parent | 24c9a9ab277897a7191d4e99213c2ab9f5d4ecd8 (diff) |
removed duplicate dispatch
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/api/LoopManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index f41c357..4d97e16 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -27,7 +27,10 @@ LoopManager::LoopManager() { [this](const ShutDownEvent & event) { return this->on_shutdown(event); }); } -void LoopManager::process_input() { this->get_system<InputSystem>().update(); } +void LoopManager::process_input() { + this->get_system<InputSystem>().update(); + this->event_manager.dispatch_events(); + } void LoopManager::start() { this->setup(); @@ -35,8 +38,6 @@ void LoopManager::start() { } void LoopManager::fixed_update() { - EventManager & ev = this->mediator.event_manager; - ev.dispatch_events(); this->get_system<ScriptSystem>().update(); this->get_system<PhysicsSystem>().update(); this->get_system<CollisionSystem>().update(); @@ -49,7 +50,6 @@ void LoopManager::loop() { while (this->loop_timer.get_lag() >= this->loop_timer.get_fixed_delta_time()) { this->process_input(); - event_manager.dispatch_events(); this->fixed_update(); this->loop_timer.advance_fixed_update(); } |