Added CTRL/SHIFT+Scrollwheel to alter camera focus and offset. ESC resets to default values. Implements FIRE-5537

ziree 2012-06-05 20:22:03 +02:00
parent b535d57164
commit 60ef266568
2 changed files with 23 additions and 0 deletions

View File

@ -2004,6 +2004,24 @@ void LLAgentCamera::handleScrollWheel(S32 clicks)
}
else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON))
{
// <FS:Zi> Camera focus and offset with CTRL/SHIFT + Scroll wheel
MASK mask=gKeyboard->currentMask(TRUE);
if(mask & MASK_SHIFT)
{
LLVector3d offset=gSavedSettings.getVector3d("FocusOffsetRearView");
offset.mdV[VZ]+=0.1f*(F32) clicks;
gSavedSettings.setVector3d("FocusOffsetRearView",offset);
return;
}
else if(mask & MASK_CONTROL)
{
LLVector3 offset=gSavedSettings.getVector3("CameraOffsetRearView");
offset.mV[VZ]+=0.1f*(F32) clicks;
gSavedSettings.setVector3("CameraOffsetRearView",offset);
return;
}
// </FS:Zi>
F32 camera_offset_initial_mag = getCameraOffsetInitial().magVec();
F32 current_zoom_fraction = mTargetCameraDistance / (camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));

View File

@ -4341,6 +4341,11 @@ void handle_reset_view()
gAgentCamera.resetView();
// </FS:Zi>
// <FS:Zi> Camera focus and offset with CTRL/SHIFT + Scroll wheel
gSavedSettings.getControl("FocusOffsetRearView")->resetToDefault();
gSavedSettings.getControl("CameraOffsetRearView")->resetToDefault();
// </FS:Zi>
gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW);
reset_view_final( TRUE );
LLFloaterCamera::resetCameraMode();