From ed1f21f333e1599d00467ecb0339880567d787e3 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Fri, 15 May 2026 11:16:11 -0700 Subject: [PATCH] allow overriding flw types --- src/d/d_msg_flow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/d/d_msg_flow.cpp b/src/d/d_msg_flow.cpp index 00a01c444f..db245f3c1c 100644 --- a/src/d/d_msg_flow.cpp +++ b/src/d/d_msg_flow.cpp @@ -764,6 +764,19 @@ int dMsgFlow_c::nodeProc(fopAc_ac_c* i_speaker_p, fopAc_ac_c** i_talkPartners) { } u8 type = mFlowNodeTBL[mNodeIdx].message.type; +#if TARGET_PC + // Overwrite the type if we have a patch for this index + if (randomizer_IsActive()) { + u32 key = (dMsgObject_getGroupID() << 16) | mNodeIdx; + // Dirty check to see if this node is part of bmg 0 + if (*(reinterpret_cast(&mFlowNodeTBL[0])) == 0x0803) { + key &= 0x0000FFFF; + } + if (randomizer_GetContext().mFlowPatches.contains(key)) { + type = reinterpret_cast(&randomizer_GetContext().mFlowPatches[key])->type; + } + } +#endif switch (type) { case NODETYPE_MESSAGE_e: proc_status = messageNodeProc(aSpeaker_p, i_talkPartners);