Skip to content

Commit

Permalink
Fix AI in Intelicard can see through walls (space-wizards#33177)
Browse files Browse the repository at this point in the history
setdrawfov added
  • Loading branch information
Baptr0b0t authored Nov 6, 2024
1 parent 1ded8e7 commit bcfacec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ private void AttachEye(Entity<StationAiCoreComponent> ent)

if (TryComp(user, out EyeComponent? eyeComp))
{
_eye.SetDrawFov(user, false, eyeComp);
_eye.SetTarget(user, ent.Comp.RemoteEntity.Value, eyeComp);
}

Expand Down Expand Up @@ -356,6 +357,7 @@ private void OnAiRemove(Entity<StationAiCoreComponent> ent, ref EntRemovedFromCo

if (TryComp(args.Entity, out EyeComponent? eyeComp))
{
_eye.SetDrawFov(args.Entity, true, eyeComp);
_eye.SetTarget(args.Entity, null, eyeComp);
}
ClearEye(ent);
Expand Down

0 comments on commit bcfacec

Please sign in to comment.