Permalink
Browse files

fix indentation of camera controls handling in WorldView

  • Loading branch information...
1 parent 39ea6dc commit ac8cd4ef8b0d916ab2db3dd86dc6222a80d8a826 @johnbartholomew johnbartholomew committed Sep 24, 2012
Showing with 18 additions and 18 deletions.
  1. +18 −18 src/WorldView.cpp
View
36 src/WorldView.cpp
@@ -803,25 +803,25 @@ void WorldView::Update()
// XXX ugly hack checking for console here
if (!Pi::IsConsoleActive()) {
if (m_activeCamera->IsExternal() == false) {
- if (KeyBindings::frontCockpit.IsActive() && GetCamType() != COCKPIT_FRONT) SetCamType(COCKPIT_FRONT);
- if (KeyBindings::rearCockpit.IsActive() && GetCamType() != COCKPIT_REAR) SetCamType(COCKPIT_REAR);
- if (KeyBindings::frontCamera.IsActive() && GetCamType() != CAM_FRONT) SetCamType(CAM_FRONT);
- if (KeyBindings::rearCamera.IsActive() && GetCamType() != CAM_REAR) SetCamType(CAM_REAR);
- if (KeyBindings::leftCamera.IsActive() && GetCamType() != CAM_LEFT) SetCamType(CAM_LEFT);
- if (KeyBindings::rightCamera.IsActive() && GetCamType() != CAM_RIGHT) SetCamType(CAM_RIGHT);
- if (KeyBindings::topCamera.IsActive() && GetCamType() != CAM_TOP) SetCamType(CAM_TOP);
- if (KeyBindings::bottomCamera.IsActive() && GetCamType() != CAM_BOTTOM) SetCamType(CAM_BOTTOM);
+ if (KeyBindings::frontCockpit.IsActive() && GetCamType() != COCKPIT_FRONT) SetCamType(COCKPIT_FRONT);
+ if (KeyBindings::rearCockpit.IsActive() && GetCamType() != COCKPIT_REAR) SetCamType(COCKPIT_REAR);
+ if (KeyBindings::frontCamera.IsActive() && GetCamType() != CAM_FRONT) SetCamType(CAM_FRONT);
+ if (KeyBindings::rearCamera.IsActive() && GetCamType() != CAM_REAR) SetCamType(CAM_REAR);
+ if (KeyBindings::leftCamera.IsActive() && GetCamType() != CAM_LEFT) SetCamType(CAM_LEFT);
+ if (KeyBindings::rightCamera.IsActive() && GetCamType() != CAM_RIGHT) SetCamType(CAM_RIGHT);
+ if (KeyBindings::topCamera.IsActive() && GetCamType() != CAM_TOP) SetCamType(CAM_TOP);
+ if (KeyBindings::bottomCamera.IsActive() && GetCamType() != CAM_BOTTOM) SetCamType(CAM_BOTTOM);
} else {
- if (KeyBindings::cameraRotateUp.IsActive()) m_activeCamera->RotateUp(frameTime);
- if (KeyBindings::cameraRotateDown.IsActive()) m_activeCamera->RotateDown(frameTime);
- if (KeyBindings::cameraRotateLeft.IsActive()) m_activeCamera->RotateLeft(frameTime);
- if (KeyBindings::cameraRotateRight.IsActive()) m_activeCamera->RotateRight(frameTime);
- if (KeyBindings::cameraZoomOut.IsActive()) m_activeCamera->ZoomEvent(ZOOM_SPEED*frameTime); // Zoom out
- if (KeyBindings::cameraZoomIn.IsActive()) m_activeCamera->ZoomEvent(-ZOOM_SPEED*frameTime);
- if (KeyBindings::cameraRollLeft.IsActive()) m_activeCamera->RollLeft(frameTime);
- if (KeyBindings::cameraRollRight.IsActive()) m_activeCamera->RollRight(frameTime);
- if (KeyBindings::resetCamera.IsActive()) m_activeCamera->Reset();
- m_activeCamera->ZoomEventUpdate(frameTime);
+ if (KeyBindings::cameraRotateUp.IsActive()) m_activeCamera->RotateUp(frameTime);
+ if (KeyBindings::cameraRotateDown.IsActive()) m_activeCamera->RotateDown(frameTime);
+ if (KeyBindings::cameraRotateLeft.IsActive()) m_activeCamera->RotateLeft(frameTime);
+ if (KeyBindings::cameraRotateRight.IsActive()) m_activeCamera->RotateRight(frameTime);
+ if (KeyBindings::cameraZoomOut.IsActive()) m_activeCamera->ZoomEvent(ZOOM_SPEED*frameTime); // Zoom out
+ if (KeyBindings::cameraZoomIn.IsActive()) m_activeCamera->ZoomEvent(-ZOOM_SPEED*frameTime);
+ if (KeyBindings::cameraRollLeft.IsActive()) m_activeCamera->RollLeft(frameTime);
+ if (KeyBindings::cameraRollRight.IsActive()) m_activeCamera->RollRight(frameTime);
+ if (KeyBindings::resetCamera.IsActive()) m_activeCamera->Reset();
+ m_activeCamera->ZoomEventUpdate(frameTime);
}
// note if we have to target the object in the crosshairs
targetObject = KeyBindings::targetObject.IsActive();

0 comments on commit ac8cd4e

Please sign in to comment.