Skip to content
Snippets Groups Projects
Commit 0e027e95 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Add RLV handling to keybinding sit command

parent 87f9d12d
Branches
No related tags found
No related merge requests found
......@@ -46,6 +46,11 @@
#include "llfloatercamera.h"
#include "llinitparam.h"
#include "llselectmgr.h"
// [RLVa:KB] - Checked: 2021-07-29 (RLVa-1.4.4a)
#include "rlvactions.h"
#include "rlvhandler.h"
#include "rlvhelper.h"
// [/RLVa:KB]
//
// Constants
......@@ -823,14 +828,18 @@ bool toggle_run(EKeystate s)
bool toggle_sit(EKeystate s)
{
if (KEYSTATE_DOWN != s) return true;
if (gAgent.isSitting())
if (isAgentAvatarValid())
{
if (gAgentAvatarp->isSitting() && RlvActions::canStand())
{
gAgent.standUp();
}
else
else if(!gAgentAvatarp->isSitting() && !gAgentAvatarp->isEditingAppearance() &&
!gAgent.getFlying() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT))
{
gAgent.sitDown();
}
}
return true;
}
......@@ -1121,7 +1130,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
if (!function)
{
LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
LL_WARNS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
......@@ -1163,7 +1172,7 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
if (!function)
{
LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
LL_WARNS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment