[Fix] Fixed the horrible rotating in external view. Also, the ships almost look badass now!
This commit is contained in:
parent
caba05d699
commit
50c5b3da0f
@ -56,6 +56,10 @@ void Player::AITurn(void) {
|
||||
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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user