From 50c5b3da0fbe32ea1a688de8fa9294bb6f739bc8 Mon Sep 17 00:00:00 2001 From: Rtch90 Date: Sun, 12 Nov 2017 19:11:14 +0000 Subject: [PATCH] [Fix] Fixed the horrible rotating in external view. Also, the ships almost look badass now! --- src/player.cpp | 8 +++++--- src/ship.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/player.cpp b/src/player.cpp index 82e2fa4..502826c 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -55,6 +55,10 @@ void Player::AITurn(void) { int mouseMotion[2]; float time_step = L3D::GetTimeStep(); float ts2 = time_step*time_step; + + SetAngThrusterState(0, 0.0f); + SetAngThrusterState(1, 0.0f); + SetAngThrusterState(2, 0.0f); if(time_step == 0) return; if(GetDockedWith()) return; @@ -105,14 +109,12 @@ void Player::AITurn(void) { } if(time_step > 10) { dBodySetAngularVel(m_body, 0, 0, 0); - SetAngThrusterState(0, 0.0f); - SetAngThrusterState(1, 0.0f); - SetAngThrusterState(2, 0.0f); } if(L3D::GetCamType() == L3D::CAM_EXTERNAL) { if(L3D::KeyState(SDLK_UP)) m_external_view_rotx -= 1; if(L3D::KeyState(SDLK_DOWN)) m_external_view_rotx += 1; if(L3D::KeyState(SDLK_LEFT)) m_external_view_roty -= 1; + if(L3D::KeyState(SDLK_RIGHT)) m_external_view_roty += 1; if(L3D::KeyState(SDLK_EQUALS)) m_external_view_dist -= 10; if(L3D::KeyState(SDLK_MINUS)) m_external_view_dist += 10; m_external_view_dist = MAX(50, m_external_view_dist); diff --git a/src/ship.cpp b/src/ship.cpp index 6526139..27aec9f 100644 --- a/src/ship.cpp +++ b/src/ship.cpp @@ -135,6 +135,6 @@ void Ship::Render(const Frame* camFrame) { params.linthrust[2] = m_thrusters[ShipType::THRUSTER_REAR] - m_thrusters[ShipType::THRUSTER_FRONT]; strncpy(params.pText[0], GetLabel().c_str(), sizeof(params.pText)); - RenderSbreModel(camFrame, 13, ¶ms); + RenderSbreModel(camFrame, 10, ¶ms); }