Skip to content

Commit

Permalink
Minor naming tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Jul 13, 2024
1 parent c67162f commit 860a999
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions BossMod/Autorotation/xan/xbase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ protected void SelectPrimaryTarget(OptionRef track, ref Actor? primaryTarget, fl
return;
}

if (Player.DistanceTo(primaryTarget) > range)
if (Player.DistanceToHitbox(primaryTarget) > range)
{
primaryTarget = Hints.PriorityTargets.Where(x => x.Actor.DistanceTo(Player) <= range).MaxBy(x => x.Actor.HPMP.CurHP)?.Actor;
primaryTarget = Hints.PriorityTargets.Where(x => x.Actor.DistanceToHitbox(Player) <= range).MaxBy(x => x.Actor.HPMP.CurHP)?.Actor;
// Hints.ForcedTarget = primaryTarget;
}
}
Expand Down
1 change: 1 addition & 0 deletions BossMod/BossModule/AIHints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class Enemy(Actor actor, bool shouldBeTanked)

// amount of time remaining we have to finish a slidecast
// this is only set to a sensible value by AIBehaviour; otherwise it will be 0 if any movement keys are being pressed or infinity otherwise
// TODO: reconsider...
public float ForceMovementIn = float.MaxValue;

// positioning: list of shapes that are either forbidden to stand in now or will be in near future
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Data/Actor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public sealed class Actor(ulong instanceID, uint oid, int spawnIndex, string nam
public ActorStatus? FindStatus<SID>(SID sid) where SID : Enum => FindStatus((uint)(object)sid);
public ActorStatus? FindStatus<SID>(SID sid, ulong source) where SID : Enum => FindStatus((uint)(object)sid, source);

public float DistanceTo(Actor? other) => other == null ? float.MaxValue : (other.Position - Position).Length() - other.HitboxRadius - HitboxRadius;
public float DistanceToHitbox(Actor? other) => other == null ? float.MaxValue : (other.Position - Position).Length() - other.HitboxRadius - HitboxRadius;

public override string ToString() => $"{OID:X} '{Name}' <{InstanceID:X}>";
}

0 comments on commit 860a999

Please sign in to comment.