diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-16 16:46:18 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-16 16:46:18 +0100 |
commit | fc5dfd2873279d5003f8a02187a71b05a44892fa (patch) | |
tree | e36d40a1b26e9d4900b582c5f06c4d1dc2858d34 /src/crepe/system/ScriptSystem.cpp | |
parent | 572741fc845f430d225a4611a94aae7a2a544d12 (diff) |
final touchups 2 for #26
Diffstat (limited to 'src/crepe/system/ScriptSystem.cpp')
-rw-r--r-- | src/crepe/system/ScriptSystem.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp index f4a826b..c4d724c 100644 --- a/src/crepe/system/ScriptSystem.cpp +++ b/src/crepe/system/ScriptSystem.cpp @@ -18,10 +18,9 @@ void ScriptSystem::update() { for (auto & script_ref : scripts) { Script & script = script_ref.get(); - BehaviorScript & component = *script.parent_ref; - if (!component.initialized) { + if (!script.initialized) { script.init(); - component.initialized = true; + script.initialized = true; } script.update(); } |