parent
4b884caf43
commit
7c89967a1d
|
|
@ -1928,7 +1928,10 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLAgent::needsRenderAvatar()
|
||||
{
|
||||
if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
|
||||
// if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
if ( (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELF)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1939,7 +1942,10 @@ BOOL LLAgent::needsRenderAvatar()
|
|||
// TRUE if we need to render your own avatar's head.
|
||||
BOOL LLAgent::needsRenderHead()
|
||||
{
|
||||
return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
return ((LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELFHEAD));
|
||||
// [/RLVa:KB]
|
||||
// return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -65,8 +65,9 @@
|
|||
#include "llsdutil.h"
|
||||
#include "llstartup.h"
|
||||
#include "llsdserialize.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
|
|
@ -1062,12 +1063,25 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
|
|||
}
|
||||
else
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
bool fRlvCanShowAttachment = true;
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
fRlvCanShowAttachment =
|
||||
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELF)) &&
|
||||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELFHEAD)) || (RLV_ATTACHGROUP_HEAD != rlvAttachGroupFromIndex(attachment->getGroup())) );
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
switch (camera_mode)
|
||||
{
|
||||
case CAMERA_MODE_MOUSELOOK:
|
||||
if (LLVOAvatar::sVisibleInFirstPerson && attachment->getVisibleInFirstPerson())
|
||||
{
|
||||
attachment->setAttachmentVisibility(TRUE);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
attachment->setAttachmentVisibility(fRlvCanShowAttachment);
|
||||
// [/RLVa:KB]
|
||||
// attachment->setAttachmentVisibility(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1075,7 +1089,10 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
attachment->setAttachmentVisibility(TRUE);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
attachment->setAttachmentVisibility(fRlvCanShowAttachment);
|
||||
// [/RLVa:KB]
|
||||
// attachment->setAttachmentVisibility(TRUE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "llviewerregion.h"
|
||||
|
||||
// Command specific includes
|
||||
#include "llagentcamera.h" // @showself
|
||||
#include "llavatarnamecache.h" // @shownames
|
||||
#include "llavatarlist.h" // @shownames
|
||||
#include "llenvmanager.h" // @setenv
|
||||
|
|
@ -1794,6 +1795,14 @@ ERlvCmdRet RlvBehaviourHandler<RLV_BHVR_SHOWNAMETAGS>::onCommand(const RlvComman
|
|||
return eRet;
|
||||
}
|
||||
|
||||
// Handles: @showself=n|y and @showselfhead=n|y toggles
|
||||
template<> template<>
|
||||
void RlvBehaviourShowSelfToggleHandler::onCommandToggle(ERlvBehaviour eBvhr, bool fHasBhvr)
|
||||
{
|
||||
if (isAgentAvatarValid())
|
||||
gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Command handlers (RLV_TYPE_FORCE)
|
||||
//
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ RlvBehaviourDictionary::RlvBehaviourDictionary()
|
|||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("showminimap", RLV_BHVR_SHOWMINIMAP));
|
||||
addEntry(new RlvBehaviourToggleProcessor<RLV_BHVR_SHOWNAMES>("shownames", RlvBehaviourInfo::BHVR_STRICT));
|
||||
addEntry(new RlvBehaviourToggleProcessor<RLV_BHVR_SHOWNAMETAGS>("shownametags", RlvBehaviourInfo::BHVR_STRICT ));
|
||||
addEntry(new RlvBehaviourGenericToggleProcessor<RLV_BHVR_SHOWSELF, RLV_OPTION_NONE, RlvBehaviourShowSelfToggleHandler>("showself", RlvBehaviourInfo::BHVR_EXTENDED));
|
||||
addEntry(new RlvBehaviourGenericToggleProcessor<RLV_BHVR_SHOWSELFHEAD, RLV_OPTION_NONE, RlvBehaviourShowSelfToggleHandler>("showselfhead", RlvBehaviourInfo::BHVR_EXTENDED));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("showworldmap", RLV_BHVR_SHOWWORLDMAP));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("sit", RLV_BHVR_SIT));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE_OR_MODIFIER>("sittp", RLV_BHVR_SITTP));
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ template<ERlvBehaviour eBhvr> using RlvReplyHandler = RlvCommandHandler<RLV_TYPE
|
|||
// List of shared handlers
|
||||
typedef RlvBehaviourHandler<RLV_BHVR_REMATTACH> RlvBehaviourAddRemAttachHandler; // Shared between @addattach and @remattach
|
||||
typedef RlvBehaviourHandler<RLV_BHVR_SENDCHANNEL> RlvBehaviourSendChannelHandler; // Shared between @addattach and @remattach
|
||||
typedef RlvBehaviourToggleHandler<RLV_BHVR_SHOWSELF> RlvBehaviourShowSelfToggleHandler; // Shared between @showself and @showselfhead
|
||||
typedef RlvForceHandler<RLV_BHVR_REMATTACH> RlvForceRemAttachHandler; // Shared between @remattach and @detach
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue