aboutsummaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-08 16:08:39 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-08 16:08:39 +0100
commite2f9c0bcaf22aa73689305faca70f2ec4682f55c (patch)
tree8d113443a0f1f629dbfdf93c0c6e742c6671a98b /game
parente6666d662678239d1d0c4c71f271855fdcdc3800 (diff)
disable time change
Diffstat (limited to 'game')
-rw-r--r--game/hud/SpeedScript.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/game/hud/SpeedScript.cpp b/game/hud/SpeedScript.cpp
index 906a38f..73469d2 100644
--- a/game/hud/SpeedScript.cpp
+++ b/game/hud/SpeedScript.cpp
@@ -3,6 +3,8 @@
#include <crepe/api/Event.h>
#include <crepe/api/KeyCodes.h>
#include <crepe/manager/LoopTimerManager.h>
+#include "../Events.h"
+#include "api/BehaviorScript.h"
using namespace crepe;
using namespace std;
@@ -21,6 +23,10 @@ void SpeedScript::init() {
return true;
});
+ this->subscribe<EndGameEvent>([this](const EndGameEvent e) {
+ this->get_component<BehaviorScript>().active = false;
+ return false;
+ });
}
void SpeedScript::fixed_update(crepe::duration_t dt) {