diff --git a/build/bin/mainV9.exe b/build/bin/mainV9.exe index 90eabb3..dc1fb2c 100644 Binary files a/build/bin/mainV9.exe and b/build/bin/mainV9.exe differ diff --git a/src/collections/methods/lower_body.cpp b/src/collections/methods/lower_body.cpp index 5703af0..05d976a 100644 --- a/src/collections/methods/lower_body.cpp +++ b/src/collections/methods/lower_body.cpp @@ -81,7 +81,7 @@ void Lower_Body::update(sf::Clock cl, float multiplier){ float dxAcc = dx->getZ_Acc() ; int64_t Dtime = cl.getElapsedTime().asMicroseconds(); - if (prevT == 0) prevT = Dtime; + if (prevT == 0) prevT >= Dtime; float dt = (float(Dtime) / 1000000.0) - (float(prevT) / 1000000.0); prevT = Dtime; diff --git a/src/rigidbody/methods/rb_class.cpp b/src/rigidbody/methods/rb_class.cpp index c0ed1bc..843cca4 100755 --- a/src/rigidbody/methods/rb_class.cpp +++ b/src/rigidbody/methods/rb_class.cpp @@ -87,7 +87,7 @@ void rigidbody::calcPos(const float Dtime){ void rigidbody::step(const sf::Clock time, float multiplier){ int64_t Dtime = time.getElapsedTime().asMicroseconds(); - if (prevT == 0) prevT = Dtime; + if (prevT == 0) prevT >= Dtime; float dt = ((float(Dtime) / 1000000.0) - (float(prevT) / 1000000.0)) * multiplier; diff --git a/src/testMain.cpp b/src/testMain.cpp index aae6534..4d53cd8 100755 --- a/src/testMain.cpp +++ b/src/testMain.cpp @@ -106,7 +106,7 @@ int main() { sf::Clock mainClock; while (gs.window.isOpen()) { - curTime += mainClock.restart().asMilliseconds(); + curTime += mainClock.restart().asMilliseconds() *(*gs.tMul) ; if (curTime > T){ if (gs.play && pos+curTime/T < maj) pos += curTime / T; curTime = 0;