From 4d77d3cca1c932516781222e0c8c14d27f876466 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 28 Feb 2012 19:07:44 -0800 Subject: PATH-199: Cleaning up code related to object flags so that I can better use the flags to managed pathfinding flags such as permanent and character. --- indra/newview/llviewerobject.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index c8152e1539..b6e3f0442e 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -468,20 +468,26 @@ public: BOOL permCopy() const; BOOL permMove() const; BOOL permTransfer() const; - inline BOOL usePhysics() const { return ((mFlags & FLAGS_USE_PHYSICS) != 0); } + inline BOOL flagUsePhysics() const { return ((mFlags & FLAGS_USE_PHYSICS) != 0); } + inline BOOL flagObjectAnyOwner() const { return ((mFlags & FLAGS_OBJECT_ANY_OWNER) != 0); } + inline BOOL flagObjectYouOwner() const { return ((mFlags & FLAGS_OBJECT_YOU_OWNER) != 0); } + inline BOOL flagObjectGroupOwned() const { return ((mFlags & FLAGS_OBJECT_GROUP_OWNED) != 0); } + inline BOOL flagObjectOwnerModify() const { return ((mFlags & FLAGS_OBJECT_OWNER_MODIFY) != 0); } + inline BOOL flagObjectModify() const { return ((mFlags & FLAGS_OBJECT_MODIFY) != 0); } + 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 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); } inline BOOL flagTakesMoney() const { return ((mFlags & FLAGS_TAKES_MONEY) != 0); } inline BOOL flagPhantom() const { return ((mFlags & FLAGS_PHANTOM) != 0); } inline BOOL flagInventoryEmpty() const { return ((mFlags & FLAGS_INVENTORY_EMPTY) != 0); } - inline BOOL flagCastShadows() const { return ((mFlags & FLAGS_CAST_SHADOWS) != 0); } inline BOOL flagAllowInventoryAdd() const { return ((mFlags & FLAGS_ALLOW_INVENTORY_DROP) != 0); } - inline BOOL flagTemporary() const { return ((mFlags & FLAGS_TEMPORARY) != 0); } inline BOOL flagTemporaryOnRez() const { return ((mFlags & FLAGS_TEMPORARY_ON_REZ) != 0); } inline BOOL flagAnimSource() const { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); } inline BOOL flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); } inline BOOL flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); } - inline BOOL flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); } U8 getPhysicsShapeType() const; inline F32 getPhysicsGravity() const { return mPhysicsGravity; } @@ -595,9 +601,11 @@ public: U32 mGLName; // GL "name" used by selection code BOOL mbCanSelect; // true if user can select this object by clicking +private: // Grabbed from UPDATE_FLAGS U32 mFlags; +public: // Sent to sim in UPDATE_FLAGS, received in ObjectPhysicsProperties U8 mPhysicsShapeType; F32 mPhysicsGravity; -- cgit v1.2.3 From 3d237bd242c01895c8122b0a2fda3e305992fd1b Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 29 Feb 2012 14:41:47 -0800 Subject: PATH-199: Starting to introducing the pathfinding flags for the object. --- indra/newview/llviewerobject.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index b6e3f0442e..63215942ac 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -477,6 +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 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 From 378ae8ce6588ce921b2aa960c08d4293c6b419e5 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 13 Mar 2012 15:33:15 -0700 Subject: PATH-199: Enforcing permanent objects in frozen state to not move. --- indra/newview/llviewerobject.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 63215942ac..1af1eff458 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -496,6 +496,8 @@ public: inline F32 getPhysicsFriction() const { return mPhysicsFriction; } inline F32 getPhysicsDensity() const { return mPhysicsDensity; } inline F32 getPhysicsRestitution() const { return mPhysicsRestitution; } + + bool isPermanentEnforced() const; bool getIncludeInSearch() const; void setIncludeInSearch(bool include_in_search); -- cgit v1.2.3 From 58041846d5b90eb980999d9569fe62621341ac1d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 16 Mar 2012 14:19:30 -0700 Subject: Removing unreachable code from the viewer. Corresponding changes made on the server to remove the message handling. --- indra/newview/llviewerobject.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 1af1eff458..ee1bac28ca 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -308,7 +308,6 @@ public: inline void setRotation(const F32 x, const F32 y, const F32 z, BOOL damped = FALSE); inline void setRotation(const LLQuaternion& quat, BOOL damped = FALSE); - void sendRotationUpdate() const; /*virtual*/ void setNumTEs(const U8 num_tes); /*virtual*/ void setTE(const U8 te, const LLTextureEntry &texture_entry); -- cgit v1.2.3 From a2fc83de1e3f47accee9387f2710727edc9e27d4 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 20 Mar 2012 15:22:30 -0700 Subject: BUGFIX: Removing server warning notification that occurs when attempting to use the inner tubes on the premium wilderness region. The updateFlags() was being called while processing a server message, which would result in erroneous data being posted back to the server. --- indra/newview/llviewerobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index ee1bac28ca..192121c021 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -513,6 +513,7 @@ public: void updateFlags(BOOL physics_changed = FALSE); BOOL setFlags(U32 flag, BOOL state); + BOOL setFlagsWithoutUpdate(U32 flag, BOOL state); void setPhysicsShapeType(U8 type); void setPhysicsGravity(F32 gravity); void setPhysicsFriction(F32 friction); -- cgit v1.2.3 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/llviewerobject.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobject.h') 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 From 72b17dea7e7eb13c387455a1567d4b746b9a7f1a Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 24 Apr 2012 15:17:12 -0700 Subject: PATH-542: Ensuring that the rotation is properly updated after the ObjectUpdate message from the server. --- indra/newview/llviewerobject.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 60665b4880..4a33c3a674 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -723,7 +723,6 @@ protected: F32 mTimeDilation; // Time dilation sent with the object. F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega) - LLQuaternion mLastRot; // last rotation received from the simulator LLVOJointInfo* mJointInfo; U8 mState; // legacy -- cgit v1.2.3 From 890c58328987fe8e05308d9151dd183b3cc69c2f Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 22 May 2012 20:01:22 +0300 Subject: MAINT-119 FIXED (PUBLIC]no-transfer textures not searchable via texture picker) - Implemented Richard's and Leo's spec - Also fixed an issue when applying no-transfer texture for an object using texture picker, creates redundant copies of the texture in the object's content --- indra/newview/llviewerobject.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index c8152e1539..dc102b666f 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -684,6 +684,10 @@ protected: F32 mAppAngle; // Apparent visual arc in degrees F32 mPixelArea; // Apparent area in pixels + // IDs of of all items in the object's content which are added to the object's content, + // but not updated on the server yet. After item was updated, its ID will be removed from this list. + std::list mPendingInventoryItemsIDs; + // This is the object's inventory from the viewer's perspective. LLInventoryObject::object_list_t* mInventory; class LLInventoryCallbackInfo -- cgit v1.2.3 From 184d5ee79d4f4b56cd042ded16c6546fa46de611 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 11 Jun 2012 12:53:36 -0500 Subject: MAINT-646 Get rid of a hotspot in LLViewerObjectList::update, fix for error in llpolymorph --- indra/newview/llviewerobject.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index dc102b666f..30c3d03635 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -229,6 +229,8 @@ public: const LLUUID &getID() const { return mID; } U32 getLocalID() const { return mLocalID; } U32 getCRC() const { return mTotalCRC; } + S32 getListIndex() const { return mListIndex; } + void setListIndex(S32 idx) { mListIndex = idx; } virtual BOOL isFlexible() const { return FALSE; } virtual BOOL isSculpted() const { return FALSE; } @@ -589,6 +591,9 @@ public: // Last total CRC received from sim, used for caching U32 mTotalCRC; + // index into LLViewerObjectList::mActiveObjects or -1 if not in list + S32 mListIndex; + LLPointer *mTEImages; // Selection, picking and rendering variables -- cgit v1.2.3 From 51f740ca8d0e947d8fde38cb353bdf753cd224fa Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 6 Jul 2012 11:31:37 -0700 Subject: MAINT-1228 FIX Can not put more than one object into the contents of an object Reviewed by Paul PE --- indra/newview/llviewerobject.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index dc102b666f..409108266e 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -432,12 +432,15 @@ public: // manager until we have better iterators. void updateInventory(LLViewerInventoryItem* item, U8 key, bool is_new); void updateInventoryLocal(LLInventoryItem* item, U8 key); // Update without messaging. + void updateTextureInventory(LLViewerInventoryItem* item, U8 key, bool is_new); LLInventoryObject* getInventoryObject(const LLUUID& item_id); void getInventoryContents(LLInventoryObject::object_list_t& objects); LLInventoryObject* getInventoryRoot(); LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id); S16 getInventorySerial() const { return mInventorySerialNum; } + bool isTextureInInventory(LLViewerInventoryItem* item); + // These functions does viewer-side only object inventory modifications void updateViewerInventoryAsset( const LLViewerInventoryItem* item, -- cgit v1.2.3 From 56d563ba7f8ed4a6284627c36f9c55935b7a9ff2 Mon Sep 17 00:00:00 2001 From: "simon@Simon-PC.lindenlab.com" Date: Wed, 11 Jul 2012 17:14:25 -0700 Subject: Fix merge issues - duplicate insertions of code --- indra/newview/llviewerobject.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 03b50c649e..30c3d03635 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -693,10 +693,6 @@ protected: // but not updated on the server yet. After item was updated, its ID will be removed from this list. std::list mPendingInventoryItemsIDs; - // IDs of of all items in the object's content which are added to the object's content, - // but not updated on the server yet. After item was updated, its ID will be removed from this list. - std::list mPendingInventoryItemsIDs; - // This is the object's inventory from the viewer's perspective. LLInventoryObject::object_list_t* mInventory; class LLInventoryCallbackInfo -- cgit v1.2.3 From 90fdf60d697f5c1e451a41eff0c6856e36cf1b64 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 12 Jul 2012 14:12:58 -0700 Subject: PATH-807: Adding an additional check for if the object is marked as volume-detect. Note that this will require Andrew's corresponding server-side change to take effect. However, the viewer change alone should have no neative effect prior to the server being updated. --- indra/newview/llviewerobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 4a33c3a674..d63ab1e10d 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -477,8 +477,9 @@ 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 gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") ? FALSE : ((mFlags & FLAGS_OBJECT_PERMANENT) != 0); } + inline BOOL flagObjectPermanent() const { return gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") ? FALSE : ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); } inline BOOL flagCharacter() const { return gSavedSettings.getBOOL("PathfindingDisableCharacterObjects") ? FALSE : ((mFlags & FLAGS_CHARACTER) != 0); } + inline BOOL flagVolumeDetect() const { return ((mFlags & FLAGS_VOLUME_DETECT) != 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 From e61785a45f7ad1ace4937423f421ea1f0b956e23 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 12 Jul 2012 14:29:11 -0700 Subject: Removing debug settings that were in place for pathfinding simulator testing. --- indra/newview/llviewerobject.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index d63ab1e10d..df09f1b640 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -45,7 +45,6 @@ #include "llvertexbuffer.h" #include "llbbox.h" #include "llbbox.h" -#include "llviewercontrol.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; @@ -477,8 +476,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 gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") ? FALSE : ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); } - inline BOOL flagCharacter() const { return gSavedSettings.getBOOL("PathfindingDisableCharacterObjects") ? FALSE : ((mFlags & FLAGS_CHARACTER) != 0); } + inline BOOL flagObjectPermanent() const { return ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); } + inline BOOL flagCharacter() const { return ((mFlags & FLAGS_CHARACTER) != 0); } inline BOOL flagVolumeDetect() const { return ((mFlags & FLAGS_VOLUME_DETECT) != 0); } inline BOOL flagIncludeInSearch() const { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); } inline BOOL flagScripted() const { return ((mFlags & FLAGS_SCRIPTED) != 0); } -- cgit v1.2.3