Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: No drawing of positional overlay if player has Right Eye, True N…
Browse files Browse the repository at this point in the history
…orth, or target has no positionals available.
  • Loading branch information
RiotNOR committed May 24, 2023
1 parent 121f070 commit 4d41cf1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions RotationSolver/UI/OverlayWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ private static void DrawPositional()

switch (shouldPos)
{
case EnemyPositional.Flank when Service.Config.DrawPositional && !Player.Object.HasStatus(true, StatusID.TrueNorth):
case EnemyPositional.Flank when Service.Config.DrawPositional && CanDrawPositional(target):
DrawRange(ClosePoints(GetPtsOnScreen(SectorPlots(pPosition, radius, Math.PI * 0.25 + rotation, COUNT).Append(pPosition))), wrong);
DrawRange(ClosePoints(GetPtsOnScreen(SectorPlots(pPosition, radius, Math.PI * 1.25 + rotation, COUNT).Append(pPosition))), wrong);
break;
case EnemyPositional.Rear when Service.Config.DrawPositional && !Player.Object.HasStatus(true, StatusID.TrueNorth):
case EnemyPositional.Rear when Service.Config.DrawPositional && CanDrawPositional(target):
DrawRange(ClosePoints(GetPtsOnScreen(SectorPlots(pPosition, radius, Math.PI * 0.75 + rotation, COUNT).Append(pPosition))), wrong);
break;

Expand All @@ -182,7 +182,11 @@ private static void DrawPositional()
}
break;
}
}

private static bool CanDrawPositional(GameObject target)
{
return !Player.Object.HasStatus(true, StatusID.TrueNorth) && !Player.Object.HasStatus(true, StatusID.RightEye) && target.HasPositional();
}

static void DrawFill(Vector3[] pts1, Vector3[] pts2, Vector3 color)
Expand Down

0 comments on commit 4d41cf1

Please sign in to comment.