aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ScriptSystem.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 11:32:59 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 11:32:59 +0100
commita61e3d522c29cfea966a06bb9f9e5e42eae2b7ab (patch)
tree7c0e7d5a0d61f8fa70442eb0584dd012225b5f44 /src/crepe/system/ScriptSystem.cpp
parent6ddb8c0e7003a66a7b350f7a11ef80803c180307 (diff)
parentb6e835c5f9da24b78a005c6c8896ad35ac965234 (diff)
merge `loek/scripts`
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 0d10011..58055d6 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_delta_time();
+ script->update(delta_time);
}
}