From c2901d122624c95185f8a8d56d52d48dad4f9f24 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 27 Mar 2026 11:43:51 -0700 Subject: [PATCH] Suppress pizzeria clicks in multiplayer Co-Authored-By: Claude Opus 4.6 (1M context) --- LEGO1/lego/legoomni/src/actors/isleactor.cpp | 10 +++++++++- extensions/src/multiplayer.cpp | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/LEGO1/lego/legoomni/src/actors/isleactor.cpp b/LEGO1/lego/legoomni/src/actors/isleactor.cpp index 6f718b55..000adc62 100644 --- a/LEGO1/lego/legoomni/src/actors/isleactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/isleactor.cpp @@ -1,11 +1,14 @@ #include "isleactor.h" +#include "extensions/multiplayer.h" #include "legoentity.h" #include "legoworld.h" #include "misc.h" #include "mxnotificationparam.h" #include "scripts.h" +using namespace Extensions; + DECOMP_SIZE_ASSERT(IsleActor, 0x7c) // FUNCTION: LEGO1 0x1002c780 @@ -45,7 +48,12 @@ MxLong IsleActor::Notify(MxParam& p_param) result = HandleButtonDown((LegoControlManagerNotificationParam&) p_param); break; case c_notificationClick: - result = HandleClick(); + if (Extension::Call(MP::HandleEntityNotify, (LegoEntity*) this).value_or(FALSE)) { + result = 1; + } + else { + result = HandleClick(); + } break; case c_notificationEndAnim: result = HandleEndAnim(); diff --git a/extensions/src/multiplayer.cpp b/extensions/src/multiplayer.cpp index de989aaa..c70f5eb8 100644 --- a/extensions/src/multiplayer.cpp +++ b/extensions/src/multiplayer.cpp @@ -152,6 +152,11 @@ MxBool MultiplayerExt::HandleEntityNotify(LegoEntity* p_entity) return FALSE; } + // Suppress pizzeria clicks entirely in multiplayer + if (p_entity->IsA("Pizzeria") && s_networkManager->IsConnected()) { + return TRUE; + } + // Only intercept plants and buildings MxU8 type = p_entity->GetType(); if (type != LegoEntity::e_plant && type != LegoEntity::e_building) {