From 9b453277059fd015703873172d0dc87b4a29cb55 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 3 Feb 2023 22:00:28 +0100 Subject: Created engine module right now containing only Point This might be a bit too generic of a name, but the intent is to get the main shared abstracts for gameplay loop and/or simulation outside of the game executable implementation to redirect dependencies. --- 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 99a0199..3e3815c 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -89,7 +89,7 @@ BaseBattle::keep_at_range() if (!_registry.valid(ai.target)) continue; const auto target = _registry.get(ai.target); - const Point offset = target.position - self.position; + const auto offset = target.position - self.position; ai.destination = target.position - offset.normalized().scale(ai.keep_at_range); } } -- cgit v1.1