From 4aeff0886aa61ed3834ef4826aa1a1f3e99508b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Sat, 2 Oct 2021 17:32:23 +0700 Subject: Clean up unused functions and style --- src/Person.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Person.cpp') diff --git a/src/Person.cpp b/src/Person.cpp index f5eb314..3789865 100644 --- a/src/Person.cpp +++ b/src/Person.cpp @@ -17,9 +17,12 @@ // You should have received a copy of the GNU General Public License // along with Black Shades. If not, see . +#include + #include #include "Person.h" +#include "Support.h" #include "misc.h" extern float multiplier; @@ -62,7 +65,7 @@ HitStruct Person::BulletCollideWithPlayer(int who, XYZ start, XYZ end){ float distancemax = 0.0f; for (auto& joint : skeleton.joints) - distancemax = max(distancemax, + distancemax = std::max(distancemax, findDistancefast(average, joint.position)); distancemax = sqrt(distancemax); @@ -615,7 +618,7 @@ void Person::DoAnimationslite(int who) * animation[targetanimation].speed[targetframe]; else target += speed * multiplier - * max(animation[currentanimation].speed[currentframe], + * std::max(animation[currentanimation].speed[currentframe], animation[targetanimation].speed[currentframe]); if ((currentanimation == crouchanim) ^ (targetanimation == crouchanim)) -- cgit v1.2.3