From 2a84562dc85516f432bb1e5de9add23c28b26ce4 Mon Sep 17 00:00:00 2001 From: Treeston Date: Fri, 6 Apr 2018 18:09:55 +0200 Subject: Core/Movement: Replace old TargetedMovementGenerator into ChaseMovementGenerator and FollowMovementGenerator, full rewrite for both. - Chase to angle is now functional. Pets use this to chase behind the target. Closes #19925. - Chase to arbitrary range interval works. Not used anywhere, but you can technically make hunter-like mobs. - Pets now follow the hunter cleanly and without stutter stepping. Also fix some other things. Closes #8924. --- src/common/Utilities/Util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common/Utilities/Util.h') diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 1240ce4205f..195aa22ca22 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -89,6 +89,9 @@ inline T RoundToInterval(T& num, T floor, T ceil) return num = std::min(std::max(num, floor), ceil); } +template +inline T square(T x) { return x*x; } + // UTF8 handling TC_COMMON_API bool Utf8toWStr(const std::string& utf8str, std::wstring& wstr); -- cgit v1.2.3