Skip to content

Commit

Permalink
Changed the instigator to the closest character instead of the first …
Browse files Browse the repository at this point in the history
…from the charactersWithinRange list.
  • Loading branch information
shreyasiyer14 authored and dkambersky committed Apr 5, 2019
1 parent 01ca251 commit 41c93e0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class FleeFromCharacterAction extends BaseAction {
public void construct(Actor actor) {
FleeComponent fleeComponent = new FleeComponent();
FindNearbyPlayersComponent component = actor.getComponent(FindNearbyPlayersComponent.class);
fleeComponent.instigator = component.charactersWithinRange.get(0);
fleeComponent.instigator = component.closestCharacter;
actor.save(fleeComponent);

}
Expand Down

0 comments on commit 41c93e0

Please sign in to comment.