From 3abd00224838681b15bc94460fc5e52722d82fe4 Mon Sep 17 00:00:00 2001 From: philippe Date: Sat, 21 Jul 2018 09:28:38 -0400 Subject: [PATCH] k --- ai/STA/Tactic/position_for_pass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai/STA/Tactic/position_for_pass.py b/ai/STA/Tactic/position_for_pass.py index 388d7746..e85d88ee 100644 --- a/ai/STA/Tactic/position_for_pass.py +++ b/ai/STA/Tactic/position_for_pass.py @@ -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):