aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ScriptSystem.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-19 13:58:58 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-19 13:58:58 +0100
commitb5c4879189a8ff55434c8c04c14163dfda83de65 (patch)
tree17595782d04038818f7ed4f6bb2199949ebd30a0 /src/crepe/system/ScriptSystem.cpp
parentebe2fcfce52d9a303c5fa19d79554e20ac7f0bac (diff)
parent794efc4ef7a44b190a4d9ecc2dd84a66c62ab005 (diff)
Merge branch 'master' into niels/UI
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);
}
}