From ffeb5e7a37817b51b2cc37a6d9fea1db6f14b96c Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 11 Oct 2022 01:01:25 -0700 Subject: [PATCH] dont trigger mind stuff if a remote player is projecting --- .../Messages/VisionTorchProjectMessage.cs | 1 + .../VisionTorch/Patches/VisionTorchPatches.cs | 18 ++++++++++++++++++ .../WorldObjects/QSBVisionTorchItem.cs | 2 ++ 3 files changed, 21 insertions(+) diff --git a/QSB/EchoesOfTheEye/VisionTorch/Messages/VisionTorchProjectMessage.cs b/QSB/EchoesOfTheEye/VisionTorch/Messages/VisionTorchProjectMessage.cs index 7c7412a3..a2fe7303 100644 --- a/QSB/EchoesOfTheEye/VisionTorch/Messages/VisionTorchProjectMessage.cs +++ b/QSB/EchoesOfTheEye/VisionTorch/Messages/VisionTorchProjectMessage.cs @@ -9,6 +9,7 @@ public class VisionTorchProjectMessage : QSBWorldObjectMessage(); + if (visionTorchItem && visionTorchItem.GetWorldObject().IsProjectingRemotely) + { + return false; + } + + return true; + } } diff --git a/QSB/EchoesOfTheEye/VisionTorch/WorldObjects/QSBVisionTorchItem.cs b/QSB/EchoesOfTheEye/VisionTorch/WorldObjects/QSBVisionTorchItem.cs index 09b6961a..b695b97d 100644 --- a/QSB/EchoesOfTheEye/VisionTorch/WorldObjects/QSBVisionTorchItem.cs +++ b/QSB/EchoesOfTheEye/VisionTorch/WorldObjects/QSBVisionTorchItem.cs @@ -6,6 +6,8 @@ namespace QSB.EchoesOfTheEye.VisionTorch.WorldObjects; public class QSBVisionTorchItem : QSBItem { + public bool IsProjectingRemotely; + public override void SendInitialState(uint to) { this.SendMessage(new VisionTorchProjectMessage(AttachedObject._isProjecting) { To = to });