Skip to content

Commit

Permalink
Make AI overlay use vis1 (#31348)
Browse files Browse the repository at this point in the history
* Make AI overlay use vis1

I think this is what get_hear in 13 uses idk this shit is esoteric.

vis1 is luminosity vis2 is line of sight.

* boark
  • Loading branch information
metalgearsloth authored Aug 23, 2024
1 parent 9b289c3 commit 7b5c6be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Content.Shared/Silicons/StationAi/StationAiVisionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ public void Execute(int index)

if (TargetTile != null)
{
if (vis2.TryGetValue(TargetTile.Value, out var tileVis2))
if (vis1.TryGetValue(TargetTile.Value, out var tileVis))
{
DebugTools.Assert(seedTiles.Contains(TargetTile.Value));

if (tileVis2 != 0)
if (tileVis != 0)
{
lock (System)
{
Expand All @@ -505,9 +505,9 @@ public void Execute(int index)
if (!System._viewportTiles.Contains(tile))
continue;

var tileVis2 = vis2.GetValueOrDefault(tile, 0);
var tileVis = vis1.GetValueOrDefault(tile, 0);

if (tileVis2 != 0)
if (tileVis != 0)
{
// No idea if it's better to do this inside or out.
lock (VisibleTiles)
Expand Down

0 comments on commit 7b5c6be

Please sign in to comment.