From e2f9c0bcaf22aa73689305faca70f2ec4682f55c Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 8 Jan 2025 16:08:39 +0100 Subject: disable time change --- game/hud/SpeedScript.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 #include #include +#include "../Events.h" +#include "api/BehaviorScript.h" using namespace crepe; using namespace std; @@ -21,6 +23,10 @@ void SpeedScript::init() { return true; }); + this->subscribe([this](const EndGameEvent e) { + this->get_component().active = false; + return false; + }); } void SpeedScript::fixed_update(crepe::duration_t dt) { -- cgit v1.2.3