From a2257ff3d0a349900ed3130df60f4791e0f1bfd3 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 10 Jun 2012 13:01:57 +0200 Subject: [PATCH] - changed : @sittp=n no longer prevents @sit:=force from succeeding if the target is >1.5m away --HG-- branch : RLVa --- indra/newview/rlvhandler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 68832c012b..0e85efe212 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -656,16 +656,15 @@ bool RlvHandler::canSit(LLViewerObject* pObj, const LLVector3& posOffset /*= LLV // - not prevented from sitting // - not prevented from standing up or not currently sitting // - not standtp restricted or not currently sitting (if the user is sitting and tried to sit elsewhere the tp would just kick in) - // - [regular sit] not @sittp=n or @fartouch=n restricted or if they clicked on a point within 1.5m of the avie's current position - // - [force sit] not @sittp=n restricted by a *different* object than the one that issued the command or the object is within 1.5m + // - not a regular sit (i.e. due to @sit:=force) + // - not @sittp=n or @fartouch=n restricted or if they clicked on a point within 1.5m of the avie's current position return ( (pObj) && (LL_PCODE_VOLUME == pObj->getPCode()) ) && (!hasBehaviour(RLV_BHVR_SIT)) && ( ((!hasBehaviour(RLV_BHVR_UNSIT)) && (!hasBehaviour(RLV_BHVR_STANDTP))) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())) ) && - ( ((NULL == getCurrentCommand() || (RLV_BHVR_SIT != getCurrentCommand()->getBehaviourType())) - ? ((!hasBehaviour(RLV_BHVR_SITTP)) && (!hasBehaviour(RLV_BHVR_FARTOUCH))) // [regular sit] - : (!hasBehaviourExcept(RLV_BHVR_SITTP, getCurrentObject()))) || // [force sit] + ( ( (NULL != getCurrentCommand()) && (RLV_BHVR_SIT == getCurrentCommand()->getBehaviourType()) ) || + ( (!hasBehaviour(RLV_BHVR_SITTP)) && (!hasBehaviour(RLV_BHVR_FARTOUCH)) ) || (dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) < 1.5f * 1.5f) ); }