[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

@@ -95,6 +95,9 @@ RlvUIEnabler::RlvUIEnabler()
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWWORLDMAP, boost::bind(&RlvUIEnabler::onToggleShowWorldMap, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_UNSIT, boost::bind(&RlvUIEnabler::onToggleUnsit, this)));
// onToggleCamXXX
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_CAMUNLOCK, boost::bind(&RlvUIEnabler::onToggleCamUnlock, this)));
// onToggleTp
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLOC, boost::bind(&RlvUIEnabler::onToggleTp, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLM, boost::bind(&RlvUIEnabler::onToggleTp, this)));
@@ -346,6 +349,13 @@ void RlvUIEnabler::onToggleShowWorldMap()
LLFloaterWorldMap::toggle();
}
// Checked: 2015-05-25 (RLVa:LF)
void RlvUIEnabler::onToggleCamUnlock()
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_CAMUNLOCK))
gAgentCamera.resetView(true, true);
}
// Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
void RlvUIEnabler::onToggleTp()
{