From 0cf735d3e52d4a5b13756d9ca0d36f22adb897f7 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:31:19 +0000 Subject: [PATCH] fix #652 probably --- .../AlarmTotemSync/Patches/AlarmTotemPatches.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/QSB/EchoesOfTheEye/AlarmTotemSync/Patches/AlarmTotemPatches.cs b/QSB/EchoesOfTheEye/AlarmTotemSync/Patches/AlarmTotemPatches.cs index 4ebd2c95..98c0690a 100644 --- a/QSB/EchoesOfTheEye/AlarmTotemSync/Patches/AlarmTotemPatches.cs +++ b/QSB/EchoesOfTheEye/AlarmTotemSync/Patches/AlarmTotemPatches.cs @@ -121,7 +121,6 @@ public class AlarmTotemPatches : QSBPatch } foreach (var player in QSBPlayerManager.PlayerList) { - // nebula said the error spam was annoying if (!player.IsReady) { continue; @@ -132,13 +131,17 @@ public class AlarmTotemPatches : QSBPatch { if (player.LightSensor.IsIlluminated()) { + // Player is visible and illuminated. __result = true; return false; } + if (player.AssignedSimulationLantern == null) { + // Player is not holding a lantern. continue; } + var lanternController = player.AssignedSimulationLantern.AttachedObject.GetLanternController(); if (lanternController.IsHeldByPlayer()) { @@ -153,14 +156,16 @@ public class AlarmTotemPatches : QSBPatch GlobalMessenger.FireEvent("ConcealFromAlarmTotem"); } } - __result = false; - return false; + + continue; } + __result = true; return false; } } } + __result = false; return false; }