summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-30 16:05:57 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-03-30 16:05:57 -0700
commit32e352ece9e3cc2e20044f621338ec07a2484773 (patch)
tree84096b45c82b6682ec8ecbd659bddb3d20d710e5
parentc1a5d6a36b925728d98c37522ed7ae53e3a87155 (diff)
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.
-rw-r--r--indra/newview/app_settings/settings.xml24
-rw-r--r--indra/newview/llviewerobject.h5
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 @@
<string>F32</string>
<key>Value</key>
<real>255</real>
- </map>
+ </map>
+ <key>PathfindingDisablePermanentObjects</key>
+ <map>
+ <key>Comment</key>
+ <string>Disables the viewer from seeing the permanent object flag. Useful for testing server-side enforcement of permanent object rules.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>PathfindingDisableCharacterObjects</key>
+ <map>
+ <key>Comment</key>
+ <string>Disables the viewer from seeing the character object flag. Useful for testing server-side enforcement of character object rules.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
</map>
</llsd>
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); }