diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-12 18:46:34 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-12 18:46:34 +0100 |
commit | f34daa492c30a0d28b747817a9f2d6fb0186cf80 (patch) | |
tree | 2c2501968f12e379ac196abb4161527d86a351e5 /src/crepe/api/Script.hpp | |
parent | b9694e8cc6b85a0089f97ff3c21862adc75a7ee5 (diff) |
clean up ReplayManager API
Diffstat (limited to 'src/crepe/api/Script.hpp')
-rw-r--r-- | src/crepe/api/Script.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crepe/api/Script.hpp b/src/crepe/api/Script.hpp index 225a51c..547fb8b 100644 --- a/src/crepe/api/Script.hpp +++ b/src/crepe/api/Script.hpp @@ -1,6 +1,7 @@ #pragma once #include "../manager/ComponentManager.h" +#include "../manager/ReplayManager.h" #include "BehaviorScript.h" #include "Script.h" @@ -36,6 +37,8 @@ void Script::subscribe_internal(const EventHandler<EventType> & callback, [this, callback](const EventType & data) -> bool { bool & active = this->active; if (!active) return false; + ReplayManager & replay = this->mediator->replay_manager; + if (replay.get_state() == ReplayManager::PLAYING) return false; return callback(data); }, channel); |