[RLVa] @camdistmax, @camdistmin

This needs testing, this all needs testing...
but hey, at least it's here, right?
This commit is contained in:
Inusaito Sayori
2015-05-26 06:16:28 -04:00
parent 1720f2ebe4
commit 75ba6cc67d
3 changed files with 82 additions and 4 deletions

View File

@@ -40,6 +40,7 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llfocusmgr.h"
#include "rlvhandler.h"
#include <boost/regex.hpp>
@@ -1161,7 +1162,8 @@ void LLViewerJoystick::moveFlycam(bool reset)
// -----------------------------------------------------------------------------
bool LLViewerJoystick::toggleFlycam()
{
if (!gSavedSettings.getBOOL("JoystickEnabled") || !gSavedSettings.getBOOL("JoystickFlycamEnabled"))
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMDISTMAX) // [RLVa:LF] - @camdistmax means no going away!
|| !gSavedSettings.getBOOL("JoystickEnabled") || !gSavedSettings.getBOOL("JoystickFlycamEnabled"))
{
mOverrideCamera = false;
return false;