Skip to content

Commit

Permalink
fix #652 probably
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Feb 6, 2024
1 parent d93d058 commit 0cf735d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions QSB/EchoesOfTheEye/AlarmTotemSync/Patches/AlarmTotemPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ private static bool CheckPlayerVisible(AlarmTotem __instance, out bool __result)
}
foreach (var player in QSBPlayerManager.PlayerList)
{
// nebula said the error spam was annoying
if (!player.IsReady)
{
continue;
Expand All @@ -132,13 +131,17 @@ private static bool CheckPlayerVisible(AlarmTotem __instance, out bool __result)
{
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())
{
Expand All @@ -153,14 +156,16 @@ private static bool CheckPlayerVisible(AlarmTotem __instance, out bool __result)
GlobalMessenger.FireEvent("ConcealFromAlarmTotem");
}
}
__result = false;
return false;

continue;
}

__result = true;
return false;
}
}
}

__result = false;
return false;
}
Expand Down

0 comments on commit 0cf735d

Please sign in to comment.