aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-21 09:10:40 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-21 09:10:40 +0100
commit9619f340827b00d4836406ded073a73b6df9386f (patch)
treee6b00c53cc0ec28dcf3e189d90b0cb4ce4cbe144 /src/crepe/api/Script.cpp
parent9a5967006c4b8cd202142517b402b4c75dc8b90b (diff)
do not call event handlers when behaviorscript is not active + add doxygenloek/collision-system
Diffstat (limited to 'src/crepe/api/Script.cpp')
-rw-r--r--src/crepe/api/Script.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crepe/api/Script.cpp b/src/crepe/api/Script.cpp
index bac5ab2..d3fae07 100644
--- a/src/crepe/api/Script.cpp
+++ b/src/crepe/api/Script.cpp
@@ -11,5 +11,7 @@ Script::~Script() {
template <>
void Script::subscribe(const EventHandler<CollisionEvent> & callback) {
- this->subscribe_internal(callback, this->game_object_id);
+ const game_object_id_t & game_object_id = *this->game_object_id_ref;
+ this->subscribe_internal(callback, game_object_id);
}
+