diff options
author | Aki <please@ignore.pl> | 2023-02-03 22:00:28 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-03 22:00:28 +0100 |
commit | 9b453277059fd015703873172d0dc87b4a29cb55 (patch) | |
tree | 3df0415c5b8160f9d97dae12f0c7adb55c4a23db /sim/src/BaseBattle.cpp | |
parent | b5a71a9c776386805a12a722be23bf8d7b7e25fe (diff) | |
download | kurator-9b453277059fd015703873172d0dc87b4a29cb55.zip kurator-9b453277059fd015703873172d0dc87b4a29cb55.tar.gz kurator-9b453277059fd015703873172d0dc87b4a29cb55.tar.bz2 |
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.
Diffstat (limited to 'sim/src/BaseBattle.cpp')
-rw-r--r-- | sim/src/BaseBattle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Transform>(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); } } |