Brought in Realistic Mouselook option from Black Dragon

Look at the top area of Input & Camera preferences
Aside from tweaks to the code, all credit to Niran.
This commit is contained in:
Inusaito Sayori
2014-05-15 21:01:11 -04:00
parent 58859ee709
commit 82044399e4
5 changed files with 50 additions and 7 deletions

View File

@@ -1298,7 +1298,12 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
if (gAgentCamera.cameraMouselook() && gSavedSettings.getBOOL("UseRealisticMouselook"))
{
look_down_limit = 160.f * DEG_TO_RAD;
look_up_limit = 20.f * DEG_TO_RAD;
}
else if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
{
look_down_limit = 130.f * DEG_TO_RAD;
}