[RLVa] Modernizations

License updates, comment updates, settings cleanup, macros cleanup, dead code removal, etc.
This commit is contained in:
Inusaito Sayori
2014-01-27 23:43:16 -05:00
parent 94aee52c64
commit 14a885f8d0
16 changed files with 167 additions and 225 deletions

View File

@@ -3,10 +3,10 @@
* Copyright (c) 2009-2011, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
*
* By copying, modifying or distributing this software, you acknowledge that
* you have read and understood your obligations described above, and agree to
@@ -660,16 +660,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:<uuid>=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) );
}
@@ -934,7 +933,7 @@ bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
{
LLViewerWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getUUID());
LLWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getUUID());
if ( (pWearable) && (!isRemovable(pWearable->getType())) )
return false; // If one wearable in the folder is non-removeable then the entire folder should be
}
@@ -1055,9 +1054,15 @@ BOOL RlvHandler::setEnabled(BOOL fEnable)
// Set up RlvUIEnabler
RlvUIEnabler::getInstance();
/* Singu Note: Off!
// Reset to show assertions if the viewer version changed
if (gSavedSettings.getString("LastRunVersion") != gLastRunVersion)
gSavedSettings.setBOOL("RLVaShowAssertionFailures", TRUE);
*/
}
return m_fEnabled; // Return enabled/disabled state
return m_fEnabled;
}
BOOL RlvHandler::canDisable()