From 31d30780ae8b49ab026779e6a1e4987724698eb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 22 Dec 2016 21:15:45 +0100 Subject: [PATCH] Fixed double set of velocity var --- Source/Objects/Person.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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) -- 2.39.5