From 42d5170e3add3dc5e7ea2c944bcfd785a5390586 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 12 Dec 2022 18:42:52 +0100 Subject: Extracted preferred keep at range distance to AI --- sim/src/BaseBattle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/src/BaseBattle.cpp') diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 448a5d7..945ef89 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -78,7 +78,7 @@ BaseBattle::keep_at_range() continue; const auto target = _registry.get(ai.target); const Point offset = target.position - self.position; - ai.destination = target.position - offset.normalized().scale(6000.0); + ai.destination = target.position - offset.normalized().scale(ai.keep_at_range); } } -- cgit v1.1