aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ScriptSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/ScriptSystem.cpp')
-rw-r--r--src/crepe/system/ScriptSystem.cpp5
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();
}