Skip to content

Commit

Permalink
math
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed May 5, 2024
1 parent 9bc1e99 commit 7b23dd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public override void DrawArenaForeground(int pcSlot, Actor pc)
{
var nesw = Service.Config.Get<TOPConfig>().P1PantokratorNESW;
var flame1Dir = Casters[0].CastInfo!.Rotation - Module.PrimaryActor.Rotation;
// if ne/sw, set of safe cones is offset by 1 rotation
if (nesw)
// if NE/SW, treat flamethrower as offset by 45 degrees, since NE/1 marker is pivot point instead of true north/A marker
flame1Dir += 45.Degrees();
flame1Dir += 60.Degrees();

var dir = flame1Dir.Normalized().Deg switch
{
Expand All @@ -40,8 +40,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc)
(> 135 and < 165) or (> -45 and < -15) => 60.Degrees(),
_ => -90.Degrees(), // assume groups go CW
};
// undo direction adjustment to correct target safe spot
if (nesw)
// if NE/SW, the set of correct safespots is offset from the N/S ones by 60 degrees, i.e. one flamethrower rotation
dir -= 60.Degrees();
var offset = 12 * (Module.PrimaryActor.Rotation + dir).ToDirection();
var pos = group == 1 ? Module.Center + offset : Module.Center - offset;
Expand Down

0 comments on commit 7b23dd5

Please sign in to comment.