Skip to content

Commit

Permalink
Fix DinoDashOrShield end pos
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheneq committed Jun 21, 2024
1 parent fe546c3 commit d1cc793
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Assembly-CSharp/AreaEffectUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,7 @@ public static Vector3 GetKnockbackOriginFromLaser(
}
#endif

// TODO make sure we properly use laserEndPos on server -- it is modified even if there are not enough targets hit!
public static List<ActorData> GetActorsInLaser(
Vector3 startPos,
Vector3 dir,
Expand Down
7 changes: 5 additions & 2 deletions Assembly-CSharp/TargetSelect_LaserChargeWithReverseCones.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ROGUES
// SERVER
using System.Collections.Generic;
using System.Linq;
using AbilityContextNamespace;
using UnityEngine;

Expand Down Expand Up @@ -285,6 +286,7 @@ private Vector3 GetChargeEndPos(List<AbilityTarget> targets, ActorData caster, o
caster.GetSquareAtPhaseStart(),
true);
List<ActorData> actorsOnPath = ClaymoreCharge.GetActorsOnPath(path, caster.GetOtherTeams(), caster);
List<ActorData> evaders = GameFlowData.Get().GetActors().Where(ServerActionBuffer.Get().ActorIsEvading).ToList();
// end custom
List<ActorData> actorsInLaser = AreaEffectUtils.GetActorsInLaser(
loSCheckPos,
Expand All @@ -297,8 +299,9 @@ private Vector3 GetChargeEndPos(List<AbilityTarget> targets, ActorData caster, o
1,
true,
true,
out _, // custom, out laserEndPoint in rogues
null);
out laserEndPoint,
null,
evaders); // custom, null in rogues
// custom
actorsInLaser.AddRange(actorsOnPath);
TargeterUtils.SortActorsByDistanceToPos(ref actorsInLaser, loSCheckPos);
Expand Down

0 comments on commit d1cc793

Please sign in to comment.