Skip to content

Commit

Permalink
k
Browse files Browse the repository at this point in the history
  • Loading branch information
wonwon0 committed Jul 21, 2018
1 parent 01da510 commit 3abd002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ai/STA/Tactic/position_for_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _find_best_player_position(self):
d = enemy.position - center
# Clamp distance norm
d = MIN_DIST_FROM_CENTER * normalize(d) if d.norm < MIN_DIST_FROM_CENTER else d
# Cube of the inverse of the distance as magnets repulsing each other.
# Square of the inverse of the distance, a bit like Newton's law of universal gravitation
v -= ATTENUATION * d / (d.norm ** 3)

if self.area.point_inside(center + v):
Expand Down

0 comments on commit 3abd002

Please sign in to comment.