Skip to content
This repository
Browse code

fix indentation of camera controls handling in WorldView

  • Loading branch information...
commit ac8cd4ef8b0d916ab2db3dd86dc6222a80d8a826 1 parent 39ea6dc
John Bartholomew johnbartholomew authored

Showing 1 changed file with 18 additions and 18 deletions. Show diff stats Hide diff stats

  1. +18 18 src/WorldView.cpp
36 src/WorldView.cpp
@@ -803,25 +803,25 @@ void WorldView::Update()
803 803 // XXX ugly hack checking for console here
804 804 if (!Pi::IsConsoleActive()) {
805 805 if (m_activeCamera->IsExternal() == false) {
806   - if (KeyBindings::frontCockpit.IsActive() && GetCamType() != COCKPIT_FRONT) SetCamType(COCKPIT_FRONT);
807   - if (KeyBindings::rearCockpit.IsActive() && GetCamType() != COCKPIT_REAR) SetCamType(COCKPIT_REAR);
808   - if (KeyBindings::frontCamera.IsActive() && GetCamType() != CAM_FRONT) SetCamType(CAM_FRONT);
809   - if (KeyBindings::rearCamera.IsActive() && GetCamType() != CAM_REAR) SetCamType(CAM_REAR);
810   - if (KeyBindings::leftCamera.IsActive() && GetCamType() != CAM_LEFT) SetCamType(CAM_LEFT);
811   - if (KeyBindings::rightCamera.IsActive() && GetCamType() != CAM_RIGHT) SetCamType(CAM_RIGHT);
812   - if (KeyBindings::topCamera.IsActive() && GetCamType() != CAM_TOP) SetCamType(CAM_TOP);
813   - if (KeyBindings::bottomCamera.IsActive() && GetCamType() != CAM_BOTTOM) SetCamType(CAM_BOTTOM);
  806 + if (KeyBindings::frontCockpit.IsActive() && GetCamType() != COCKPIT_FRONT) SetCamType(COCKPIT_FRONT);
  807 + if (KeyBindings::rearCockpit.IsActive() && GetCamType() != COCKPIT_REAR) SetCamType(COCKPIT_REAR);
  808 + if (KeyBindings::frontCamera.IsActive() && GetCamType() != CAM_FRONT) SetCamType(CAM_FRONT);
  809 + if (KeyBindings::rearCamera.IsActive() && GetCamType() != CAM_REAR) SetCamType(CAM_REAR);
  810 + if (KeyBindings::leftCamera.IsActive() && GetCamType() != CAM_LEFT) SetCamType(CAM_LEFT);
  811 + if (KeyBindings::rightCamera.IsActive() && GetCamType() != CAM_RIGHT) SetCamType(CAM_RIGHT);
  812 + if (KeyBindings::topCamera.IsActive() && GetCamType() != CAM_TOP) SetCamType(CAM_TOP);
  813 + if (KeyBindings::bottomCamera.IsActive() && GetCamType() != CAM_BOTTOM) SetCamType(CAM_BOTTOM);
814 814 } else {
815   - if (KeyBindings::cameraRotateUp.IsActive()) m_activeCamera->RotateUp(frameTime);
816   - if (KeyBindings::cameraRotateDown.IsActive()) m_activeCamera->RotateDown(frameTime);
817   - if (KeyBindings::cameraRotateLeft.IsActive()) m_activeCamera->RotateLeft(frameTime);
818   - if (KeyBindings::cameraRotateRight.IsActive()) m_activeCamera->RotateRight(frameTime);
819   - if (KeyBindings::cameraZoomOut.IsActive()) m_activeCamera->ZoomEvent(ZOOM_SPEED*frameTime); // Zoom out
820   - if (KeyBindings::cameraZoomIn.IsActive()) m_activeCamera->ZoomEvent(-ZOOM_SPEED*frameTime);
821   - if (KeyBindings::cameraRollLeft.IsActive()) m_activeCamera->RollLeft(frameTime);
822   - if (KeyBindings::cameraRollRight.IsActive()) m_activeCamera->RollRight(frameTime);
823   - if (KeyBindings::resetCamera.IsActive()) m_activeCamera->Reset();
824   - m_activeCamera->ZoomEventUpdate(frameTime);
  815 + if (KeyBindings::cameraRotateUp.IsActive()) m_activeCamera->RotateUp(frameTime);
  816 + if (KeyBindings::cameraRotateDown.IsActive()) m_activeCamera->RotateDown(frameTime);
  817 + if (KeyBindings::cameraRotateLeft.IsActive()) m_activeCamera->RotateLeft(frameTime);
  818 + if (KeyBindings::cameraRotateRight.IsActive()) m_activeCamera->RotateRight(frameTime);
  819 + if (KeyBindings::cameraZoomOut.IsActive()) m_activeCamera->ZoomEvent(ZOOM_SPEED*frameTime); // Zoom out
  820 + if (KeyBindings::cameraZoomIn.IsActive()) m_activeCamera->ZoomEvent(-ZOOM_SPEED*frameTime);
  821 + if (KeyBindings::cameraRollLeft.IsActive()) m_activeCamera->RollLeft(frameTime);
  822 + if (KeyBindings::cameraRollRight.IsActive()) m_activeCamera->RollRight(frameTime);
  823 + if (KeyBindings::resetCamera.IsActive()) m_activeCamera->Reset();
  824 + m_activeCamera->ZoomEventUpdate(frameTime);
825 825 }
826 826 // note if we have to target the object in the crosshairs
827 827 targetObject = KeyBindings::targetObject.IsActive();

0 comments on commit ac8cd4e

Please sign in to comment.
Something went wrong with that request. Please try again.