aboutsummaryrefslogtreecommitdiff
path: root/src/Person.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-10-02 17:32:23 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-10-02 17:32:23 +0700
commit4aeff0886aa61ed3834ef4826aa1a1f3e99508b1 (patch)
tree0be178818e4ed9de7e70872c224ce73adaba8f6a /src/Person.cpp
parent7a4fdb3978c36e4309479806140f38669bcd3883 (diff)
downloadblackshades-4aeff0886aa61ed3834ef4826aa1a1f3e99508b1.tar.gz
Clean up unused functions and style2.4.0
Diffstat (limited to 'src/Person.cpp')
-rw-r--r--src/Person.cpp7
1 files changed, 5 insertions, 2 deletions
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 <https://www.gnu.org/licenses/>.
+#include <algorithm>
+
#include <GLFW/glfw3.h>
#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))