From 00d968978bc15d0ae73a0dd48161d3228e85b52a Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Wed, 27 Nov 2024 15:57:08 -0700 Subject: [PATCH] Replace two hardcoded magic values with constants --- LEGO1/lego/legoomni/src/common/legogamestate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index e71fa871..90db724b 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -761,13 +761,13 @@ void LegoGameState::StopArea(Area p_area) InvokeAction(Extra::e_close, *g_racecarScript, RacecarScript::c__StartUp, NULL); break; case e_act2main: - if (m_currentArea != 2) { + if (m_currentArea != e_infomain) { InvokeAction(Extra::e_stop, *g_act2mainScript, Act2mainScript::c__Act2Main, NULL); InvokeAction(Extra::e_close, *g_act2mainScript, Act2mainScript::c__Act2Main, NULL); } break; case e_act3script: - if (m_currentArea != 2) { + if (m_currentArea != e_infomain) { InvokeAction(Extra::e_stop, *g_act3Script, Act3Script::c__Act3, NULL); InvokeAction(Extra::e_close, *g_act3Script, Act3Script::c__Act3, NULL); }