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(+) (limited to 'game/hud/SpeedScript.cpp') 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 From f857cb4013701a24cff5131d64e5ab238392faab Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 8 Jan 2025 16:14:27 +0100 Subject: `make format` --- game/hud/SpeedScript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/hud/SpeedScript.cpp') diff --git a/game/hud/SpeedScript.cpp b/game/hud/SpeedScript.cpp index 73469d2..2ced47a 100644 --- a/game/hud/SpeedScript.cpp +++ b/game/hud/SpeedScript.cpp @@ -1,10 +1,10 @@ #include "SpeedScript.h" +#include "../Events.h" +#include "api/BehaviorScript.h" #include #include #include -#include "../Events.h" -#include "api/BehaviorScript.h" using namespace crepe; using namespace std; -- cgit v1.2.3