From 71bd8cd630501d3b5445257271127abd6064df7f Mon Sep 17 00:00:00 2001 From: Sara Date: Sat, 25 Oct 2025 13:21:55 +0200 Subject: [PATCH] fix: state machine only acts if enabled --- modules/wave_survival/state_machine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wave_survival/state_machine.cpp b/modules/wave_survival/state_machine.cpp index 2f30e3ef..a54727a6 100644 --- a/modules/wave_survival/state_machine.cpp +++ b/modules/wave_survival/state_machine.cpp @@ -19,7 +19,7 @@ void StateMachine::switch_to_state(State *state) { } void StateMachine::process(double delta) { - if (this->current_state) { + if (this->current_state && is_enabled()) { this->current_state->process(delta); String new_state{ this->current_state->get_next_state() }; if (new_state != this->current_state->get_class()) {