[RLVa] @camunlock

Causes LLAgentCamera::unlockView() to not happen, this turns off camera orbits.
Enables sim camera constraints regardless of user preference.
Resets camera when turned on.
This commit is contained in:
Inusaito Sayori
2015-05-26 01:05:37 -04:00
parent d81497d29f
commit 323b49de17
4 changed files with 17 additions and 1 deletions

View File

@@ -369,6 +369,8 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
//-----------------------------------------------------------------------------
void LLAgentCamera::unlockView()
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMUNLOCK)) return; // [RLVa:LF] - camunlock
if (getFocusOnAvatar())
{
if (isAgentAvatarValid())
@@ -1853,7 +1855,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
static const LLCachedControl<bool> sg_ignore_sim_cam_consts("SGIgnoreSimulatorCameraConstraints",false);
if ( !mCameraCollidePlane.isExactlyZero()
&& !sg_ignore_sim_cam_consts
&& (!sg_ignore_sim_cam_consts || gRlvHandler.hasBehaviour(RLV_BHVR_CAMUNLOCK))
&& isAgentAvatarValid()
&& !gAgentAvatarp->isSitting())
{