aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-18 14:07:39 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-18 14:07:39 +0100
commit8dfdb5a588614db80fa8f41ccf883c1766fe56ff (patch)
tree3f5a323bc6f23ed1072bded1ac2b527c2bb031a6 /src/crepe/system
parentefcb4e88c7b921684379adce2a3d09c8f9aaf3a3 (diff)
parent8afdca56d61a6c66ad1ac1bbd092192eeb827173 (diff)
merge master
Diffstat (limited to 'src/crepe/system')
-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 0d10011..746285f 100644
--- a/src/crepe/system/ScriptSystem.cpp
+++ b/src/crepe/system/ScriptSystem.cpp
@@ -12,6 +12,7 @@ void ScriptSystem::fixed_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) {
@@ -24,6 +25,8 @@ void ScriptSystem::fixed_update() {
script->init();
script->initialized = true;
}
- script->update();
+
+ duration_t delta_time = timer.get_scaled_fixed_delta_time();
+ script->update(delta_time);
}
}