aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-22 17:26:27 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-22 17:26:27 +0100
commit0dae96161a99158815a8075b5c405a35b0939936 (patch)
tree5b9b214c0397694b671e271f6b743c0fd845f51f /src
parent7e12ebdf945d40d6f11872cf5852c9bb54d1864f (diff)
fix Player prefab
Diffstat (limited to 'src')
-rw-r--r--src/crepe/api/GameObject.h7
-rw-r--r--src/crepe/system/ScriptSystem.cpp8
2 files changed, 5 insertions, 10 deletions
diff --git a/src/crepe/api/GameObject.h b/src/crepe/api/GameObject.h
index c66da3d..043913a 100644
--- a/src/crepe/api/GameObject.h
+++ b/src/crepe/api/GameObject.h
@@ -37,13 +37,6 @@ private:
//! ComponentManager instances GameObject
friend class ComponentManager;
-protected:
- GameObject(GameObject &&) = default;
-
- GameObject(const GameObject &) = delete;
- GameObject & operator=(const GameObject &) = delete;
- GameObject & operator=(GameObject &&) = delete;
-
public:
//! The id of the GameObject
const game_object_id_t id;
diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp
index 4cce42b..411a9a3 100644
--- a/src/crepe/system/ScriptSystem.cpp
+++ b/src/crepe/system/ScriptSystem.cpp
@@ -36,15 +36,17 @@ void ScriptSystem::update(
script->init();
script->initialized = true;
} catch (const exception & e) {
- Log::logf(Log::Level::WARNING, "Uncaught exception in {} init: {}", behavior_script.name, e.what());
+ Log::logf(Log::Level::WARNING, "Disabled script \"{}\" due to exception in init function: {}", behavior_script.name, e.what());
+ behavior_script.active = false;
}
}
try {
(*script.*update_function)(delta_time);
} catch (const exception & e) {
- // TODO: print if it is fixed/frame update
- Log::logf(Log::Level::WARNING, "Uncaught exception in {}: {}", behavior_script.name, e.what());
+ // TODO: discern between fixed/frame update
+ Log::logf(Log::Level::WARNING, "Disabled script \"{}\" due to exception in update function: {}", behavior_script.name, e.what());
+ behavior_script.active = false;
}
}
}