From: Côme Chilliet Date: Thu, 22 Dec 2016 20:15:45 +0000 (+0100) Subject: Fixed double set of velocity var X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=31d30780ae8b49ab026779e6a1e4987724698eb1;p=lugaru.git Fixed double set of velocity var --- diff --git a/Source/Objects/Person.cpp b/Source/Objects/Person.cpp index a500e2a..af2f53b 100644 --- a/Source/Objects/Person.cpp +++ b/Source/Objects/Person.cpp @@ -5915,8 +5915,9 @@ void Person::DoStuff() velocity.y = 0; if (velspeed < multiplier * 300 * scale) { velocity = 0; - } else + } else { velocity -= velocity / velspeed * multiplier * 300 * scale; + } if (velspeed > 5 && (isLanding() || isLandhard())) { skiddingdelay += multiplier; if (skiddelay <= 0) { @@ -5924,17 +5925,13 @@ void Person::DoStuff() FootLand(rightfoot, .5); skiddelay = .02; } - } else + } else { skiddingdelay = 0; + } } if (isLandhard()) { velspeed = findLength(&velocity); - velocity.y = 0; - if (velspeed < multiplier * 600 * scale) { - velocity = 0; - } else - velocity -= velocity / velspeed * multiplier * 600 * scale; velocity = 0; if (velspeed > 5 && (isLanding() || isLandhard())) { skiddingdelay += multiplier; @@ -5943,8 +5940,9 @@ void Person::DoStuff() FootLand(rightfoot, .5); skiddelay = .02; } - } else + } else { skiddingdelay = 0; + } } if (skiddingdelay < 0)