From e59b602aee2352f7b45dccb1997ed5856d775d23 Mon Sep 17 00:00:00 2001
From: JonShard <jonems@stud.ntnu.no>
Date: Mon, 14 May 2018 11:57:07 +0200
Subject: [PATCH] Imroved stalling.

---
 src/main.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 62a3542..a825f00 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -216,10 +216,8 @@ int main(int argc, char** args)
                                         glm::sin(-rot.x ), 
                                         glm::cos(rot.y)*glm::cos(rot.x));
         ImGui::Text("Plane speed: %f", Input::m_planeSpeed);     // Print to GUI.
-        if (Input::m_planeSpeed < Input::m_planeMaxSpeed / 4);
-        {
-            pos.y += glm::clamp(1 - (Input::m_planeSpeed) / (Input::m_planeMaxSpeed / 4), -0.1f, 0.0f) * 0.1;
-        }
+
+        pos.y -= (1 - Input::m_planeSpeed / Input::m_planeMaxSpeed / 4.0f) * dt;    // Stalling.
         plane-> setPosition(pos);
         plane-> setRotation(glm::degrees(rot));
 
-- 
GitLab