[RLVa] Cleanup for the last commits
camAvDist, camMax and camMin are now combined into: -camPole: returns the saved pole of the highest degree -updatePole: updates the saved pole to the highest degree when the related exception is changed Poles are now cached in a map called m_Poles in the RlvHandler.
This commit is contained in:
@@ -975,7 +975,7 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
|
||||
// [RLVa:LF] - @camdistmax, @camdistmin
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX))
|
||||
{
|
||||
F32 dist_max(gRlvHandler.camMax(RLV_BHVR_CAMDISTMAX));
|
||||
F32 dist_max(gRlvHandler.camPole(RLV_BHVR_CAMDISTMAX));
|
||||
if (0 >= dist_max)
|
||||
{
|
||||
if (!cameraMouselook())
|
||||
@@ -986,7 +986,7 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
|
||||
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMIN))
|
||||
{
|
||||
F32 dist_min(gRlvHandler.camMin(RLV_BHVR_CAMDISTMIN));
|
||||
F32 dist_min(gRlvHandler.camPole(RLV_BHVR_CAMDISTMIN));
|
||||
if (cameraMouselook() && dist_min > 0)
|
||||
changeCameraToDefault(); // Just to be sure we're not in mouselook
|
||||
}
|
||||
@@ -2041,7 +2041,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
bool rlvConstrained = false; // You Only Constrain Once
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX))
|
||||
{
|
||||
F32 max_dist(gRlvHandler.camMax(RLV_BHVR_CAMDISTMAX));
|
||||
F32 max_dist(gRlvHandler.camPole(RLV_BHVR_CAMDISTMAX));
|
||||
if (total_dist > max_dist)
|
||||
{
|
||||
camera_position_global = agent_pos + (max_dist/total_dist)*offset;
|
||||
@@ -2050,7 +2050,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
}
|
||||
if (!rlvConstrained && gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMIN))
|
||||
{
|
||||
F32 min_dist(gRlvHandler.camMin(RLV_BHVR_CAMDISTMIN));
|
||||
F32 min_dist(gRlvHandler.camPole(RLV_BHVR_CAMDISTMIN));
|
||||
if (total_dist < min_dist)
|
||||
{
|
||||
camera_position_global = agent_pos + (min_dist/total_dist)*offset;
|
||||
@@ -2225,7 +2225,7 @@ void LLAgentCamera::resetCamera()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
||||
{
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMIN) && gRlvHandler.camMin(RLV_BHVR_CAMDISTMIN) > 0) return; // [RLVa:LF] - @camdistmin
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMIN) && gRlvHandler.camPole(RLV_BHVR_CAMDISTMIN) > 0) return; // [RLVa:LF] - @camdistmin
|
||||
|
||||
if (!gSavedSettings.getBOOL("EnableMouselook")
|
||||
|| LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
@@ -2315,7 +2315,7 @@ void LLAgentCamera::changeCameraToDefault()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::changeCameraToFollow(BOOL animate)
|
||||
{
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) && 0 >= gRlvHandler.camMax(RLV_BHVR_CAMDISTMAX)) return; // [RLVa:LF] - @camdistmax
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) && 0 >= gRlvHandler.camPole(RLV_BHVR_CAMDISTMAX)) return; // [RLVa:LF] - @camdistmax
|
||||
|
||||
if (LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
{
|
||||
@@ -2375,7 +2375,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
|
||||
{
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) && 0 >= gRlvHandler.camMax(RLV_BHVR_CAMDISTMAX)) return; // [RLVa:LF] - @camdistmax
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) && 0 >= gRlvHandler.camPole(RLV_BHVR_CAMDISTMAX)) return; // [RLVa:LF] - @camdistmax
|
||||
|
||||
if (LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
{
|
||||
@@ -2460,7 +2460,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::changeCameraToCustomizeAvatar()
|
||||
{
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) && 0 >= gRlvHandler.camMax(RLV_BHVR_CAMDISTMAX)) return; // [RLVa:LF] - @camdistmax
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) && 0 >= gRlvHandler.camPole(RLV_BHVR_CAMDISTMAX)) return; // [RLVa:LF] - @camdistmax
|
||||
|
||||
if (LLViewerJoystick::getInstance()->getOverrideCamera() || !isAgentAvatarValid())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user