Skip to content

Commit

Permalink
Fix MapComponent.LightingEnabled funky FOV.
Browse files Browse the repository at this point in the history
There's two separate bool checks, one wasn't turned off, meaning the FOV kept being rendered but not updated.
  • Loading branch information
PJB3005 committed Mar 29, 2024
1 parent 4002cbd commit 958b5dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ END TEMPLATE-->

### Bugfixes

*None yet*
* Fix `MapComponent.LightingEnabled` not leaving FOV rendering in a broken state.

### Other

Expand Down
5 changes: 4 additions & 1 deletion Robust.Client/Graphics/Clyde/Clyde.HLR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Robust.Shared.Enums;
using Robust.Shared.Graphics;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Maths;
using Robust.Shared.Profiling;
using Robust.Shared.Utility;
Expand Down Expand Up @@ -514,7 +515,9 @@ private void RenderViewport(Viewport viewport)

if (_lightManager.Enabled && _lightManager.DrawHardFov && eye.DrawLight && eye.DrawFov)
{
ApplyFovToBuffer(viewport, eye);
var mapUid = _mapManager.GetMapEntityId(eye.Position.MapId);
if (_entityManager.GetComponent<MapComponent>(mapUid).LightingEnabled)
ApplyFovToBuffer(viewport, eye);
}
}

Expand Down

0 comments on commit 958b5dd

Please sign in to comment.