From a93333ddbf97173e54af0a5638f234d28a227c3a Mon Sep 17 00:00:00 2001 From: Okke <34428344+okk3@users.noreply.github.com> Date: Mon, 6 Aug 2018 00:08:37 +0200 Subject: [PATCH] Function updateJump() fix nextT should cast double as it's a second degree equation and results in a double type. -> Bhaskara. --- src/client/creature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/creature.cpp b/src/client/creature.cpp index 00d23d54..d29eac56 100644 --- a/src/client/creature.cpp +++ b/src/client/creature.cpp @@ -405,7 +405,7 @@ void Creature::updateJump() int nextT, i = 1; do { - nextT = stdext::round((-b + std::sqrt(std::max(b*b + 4*a*(roundHeight+diff*i), 0.0)) * diff) / (2*a)); + nextT = stdext::round((-b + std::sqrt(std::max(b*b + 4*a*(roundHeight+diff*i), 0.0)) * diff) / (2*a)); ++i; if(nextT < halfJumpDuration)