aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ScriptSystem.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-19 09:31:59 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-19 09:31:59 +0100
commit6c5e55a1c7d7de3f518fa12f2316e871ad4d9dd2 (patch)
treea86d846ec2ee1bc97e17297e7155ed4d35b04b5a /src/crepe/system/ScriptSystem.cpp
parentee6bf92b661a3762fa3886409641958f32544f88 (diff)
parentd8f1e161b0c98baa7dde287c484529a8b1291626 (diff)
merge with master
Diffstat (limited to 'src/crepe/system/ScriptSystem.cpp')
-rw-r--r--src/crepe/system/ScriptSystem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp
index d6b2ca1..0605c7a 100644
--- a/src/crepe/system/ScriptSystem.cpp
+++ b/src/crepe/system/ScriptSystem.cpp
@@ -11,6 +11,7 @@ void ScriptSystem::update() {
dbg_trace();
ComponentManager & mgr = this->mediator.component_manager;
+ LoopTimerManager & timer = this->mediator.loop_timer;
RefVector<BehaviorScript> behavior_scripts = mgr.get_components_by_type<BehaviorScript>();
for (BehaviorScript & behavior_script : behavior_scripts) {
@@ -23,6 +24,8 @@ void ScriptSystem::update() {
script->init();
script->initialized = true;
}
- script->update();
+
+ duration_t delta_time = timer.get_scaled_fixed_delta_time();
+ script->update(delta_time);
}
}