From dbec556dd3107e4b4ec90412e2beba4fe3fd7760 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sat, 26 Mar 2022 22:24:05 -0700 Subject: [PATCH] QSBLightSensor: don't disable lights if local player is still in the sector :)) --- .../LightSensorSync/WorldObjects/QSBLightSensor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/QSB/EchoesOfTheEye/LightSensorSync/WorldObjects/QSBLightSensor.cs b/QSB/EchoesOfTheEye/LightSensorSync/WorldObjects/QSBLightSensor.cs index 52dc4535..042ac136 100644 --- a/QSB/EchoesOfTheEye/LightSensorSync/WorldObjects/QSBLightSensor.cs +++ b/QSB/EchoesOfTheEye/LightSensorSync/WorldObjects/QSBLightSensor.cs @@ -17,6 +17,12 @@ internal class QSBLightSensor : WorldObject public void SetEnabled(bool enabled) { + if (AttachedObject._sector.ContainsAnyOccupants(DynamicOccupant.Player | DynamicOccupant.Probe)) + { + // local player is in sector, do not disable lights + return; + } + if (enabled && !AttachedObject.enabled) { AttachedObject.enabled = true;