From 1782c8e5f821e5d131061e66adbdc2f5d9dce4a0 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 6 Apr 2024 12:57:55 -0400 Subject: [PATCH] Match GasStation::HandleClick --- LEGO1/lego/legoomni/src/worlds/gasstation.cpp | 57 ++++++++++--------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp index d0a3349d..477931f9 100644 --- a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp @@ -312,36 +312,41 @@ MxLong GasStation::HandleButtonDown(LegoControlManagerEvent& p_param) // FUNCTION: LEGO1 0x10005b20 MxLong GasStation::HandleClick(LegoControlManagerEvent& p_param) { - switch (p_param.GetClickedObjectId()) { - case GarageScript::c_LeftArrow_Ctl: - case GarageScript::c_RightArrow_Ctl: - m_state->m_unk0x14.m_unk0x00 = 0; - m_destLocation = LegoGameState::Area::e_garadoor; + if (p_param.GetUnknown0x28() == 1) { + MxDSAction action; - m_state->FUN_10006490(); - m_radio.Stop(); - BackgroundAudioManager()->Stop(); - TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); - break; - case GarageScript::c_Info_Ctl: - m_state->m_unk0x14.m_unk0x00 = 0; - m_destLocation = LegoGameState::Area::e_infomain; + switch (p_param.GetClickedObjectId()) { + case GarageScript::c_LeftArrow_Ctl: + case GarageScript::c_RightArrow_Ctl: + m_state->m_unk0x14.m_unk0x00 = 0; + m_destLocation = LegoGameState::Area::e_garadoor; - m_state->FUN_10006490(); - m_radio.Stop(); - BackgroundAudioManager()->Stop(); - TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); - break; - case GarageScript::c_Buggy_Ctl: - m_state->m_unk0x14.m_unk0x00 = 0; - m_destLocation = LegoGameState::Area::e_dunecarbuild; + m_state->FUN_10006490(); + m_radio.Stop(); + BackgroundAudioManager()->Stop(); + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); + break; + case GarageScript::c_Info_Ctl: + m_state->m_unk0x14.m_unk0x00 = 0; + m_destLocation = LegoGameState::Area::e_infomain; - m_state->FUN_10006490(); - m_radio.Stop(); - BackgroundAudioManager()->Stop(); - TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); - break; + m_state->FUN_10006490(); + m_radio.Stop(); + BackgroundAudioManager()->Stop(); + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); + break; + case GarageScript::c_Buggy_Ctl: + m_state->m_unk0x14.m_unk0x00 = 0; + m_destLocation = LegoGameState::Area::e_dunecarbuild; + + m_state->FUN_10006490(); + m_radio.Stop(); + BackgroundAudioManager()->Stop(); + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); + break; + } } + return 1; }