From 32e352ece9e3cc2e20044f621338ec07a2484773 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 30 Mar 2012 16:05:57 -0700 Subject: Adding in some debug functionality to allow permanent and/or character flags on objects to be hidden from the viewer. This enables testing of the server-side enforcement of object rules. --- indra/newview/app_settings/settings.xml | 24 +++++++++++++++++++++++- indra/newview/llviewerobject.h | 5 +++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1d616a76fb..8e9a82a77d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13842,6 +13842,28 @@ F32 Value 255 - + + PathfindingDisablePermanentObjects + + Comment + Disables the viewer from seeing the permanent object flag. Useful for testing server-side enforcement of permanent object rules. + Persist + 0 + Type + Boolean + Value + 0 + + PathfindingDisableCharacterObjects + + Comment + Disables the viewer from seeing the character object flag. Useful for testing server-side enforcement of character object rules. + Persist + 0 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 192121c021..60665b4880 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -45,6 +45,7 @@ #include "llvertexbuffer.h" #include "llbbox.h" #include "llbbox.h" +#include "llviewercontrol.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; @@ -476,8 +477,8 @@ public: inline BOOL flagObjectCopy() const { return ((mFlags & FLAGS_OBJECT_COPY) != 0); } inline BOOL flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); } inline BOOL flagObjectTransfer() const { return ((mFlags & FLAGS_OBJECT_TRANSFER) != 0); } - inline BOOL flagObjectPermanent() const { return ((mFlags & FLAGS_OBJECT_PERMANENT) != 0); } - inline BOOL flagCharacter() const { return ((mFlags & FLAGS_CHARACTER) != 0); } + inline BOOL flagObjectPermanent() const { return gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") ? FALSE : ((mFlags & FLAGS_OBJECT_PERMANENT) != 0); } + inline BOOL flagCharacter() const { return gSavedSettings.getBOOL("PathfindingDisableCharacterObjects") ? FALSE : ((mFlags & FLAGS_CHARACTER) != 0); } inline BOOL flagIncludeInSearch() const { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); } inline BOOL flagScripted() const { return ((mFlags & FLAGS_SCRIPTED) != 0); } inline BOOL flagHandleTouch() const { return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); } -- cgit v1.2.3