From 94c4576e8d001f1ced3bb2e4edd1a5cca85ffd3e Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Fri, 9 Feb 2024 10:28:22 -0500 Subject: [PATCH] Implement Police::HandleEndAction (#543) * Implement Police::HandleEndAction * Style fixes --------- Co-authored-by: Christian Semmler --- LEGO1/lego/legoomni/src/police/police.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/src/police/police.cpp b/LEGO1/lego/legoomni/src/police/police.cpp index 44c2aabd..88ee2bc0 100644 --- a/LEGO1/lego/legoomni/src/police/police.cpp +++ b/LEGO1/lego/legoomni/src/police/police.cpp @@ -100,10 +100,20 @@ MxLong Police::HandleNotification11(MxNotificationParam& p_param) return 0; } -// STUB: LEGO1 0x1005e6a0 +// FUNCTION: LEGO1 0x1005e6a0 MxLong Police::HandleEndAction(MxEndActionNotificationParam& p_param) { - // TODO + MxDSAction* action = p_param.GetAction(); + + if (m_radio.Notify(p_param) == 0 && m_atom == action->GetAtomId()) { + if (m_policeState->GetUnknown0x0c() == 1) { + m_policeState->SetUnknown0x0c(0); + return 1; + } + + return 0; + } + return 0; }