diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llparcel.cpp | 23 | ||||
-rw-r--r-- | indra/llinventory/llparcel.h | 19 |
2 files changed, 31 insertions, 11 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index b388d34580..e026ad32f9 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -227,8 +227,10 @@ void LLParcel::init(const LLUUID &owner_id, setPreviousOwnerID(LLUUID::null); setPreviouslyGroupOwned(FALSE); - setHiddenAVs(false); - setHaveHiddenAVsData(false); + setHiddenAVs(FALSE); + setAllowGroupAVSounds(TRUE); + setAllowAnyAVSounds(TRUE); + setHaveNewParcelLimitData(FALSE); } void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned) @@ -706,6 +708,8 @@ void LLParcel::packMessage(LLSD& msg) msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt); msg["landing_type"] = (U8)mLandingType; msg["hidden_avs"] = (LLSD::Boolean) getHiddenAVs(); + msg["group_av_sounds"] = (LLSD::Boolean) getAllowGroupAVSounds(); + msg["any_av_sounds"] = (LLSD::Boolean) getAllowAnyAVSounds(); } @@ -725,13 +729,22 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) setMediaURL(buffer); BOOL hidden_avs = FALSE; - bool have_hidden_av_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_HiddenAVs) > 0); - if (have_hidden_av_data) + BOOL any_av_sounds = TRUE; + BOOL group_av_sounds = TRUE; + bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_HiddenAVs) > 0); // New version of server should send all 3 of these values + have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0); + have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0); + if (have_new_parcel_limit_data) { msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_HiddenAVs, hidden_avs); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds, any_av_sounds); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds, group_av_sounds); } setHiddenAVs((bool) hidden_avs); - setHaveHiddenAVsData(have_hidden_av_data); + setAllowAnyAVSounds((bool) any_av_sounds); + setAllowGroupAVSounds((bool) group_av_sounds); + + setHaveNewParcelLimitData(have_new_parcel_limit_data); // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index e785dba91b..c27e5a5091 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -271,8 +271,8 @@ public: void setUserLocation(const LLVector3& pos) { mUserLocation = pos; } void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; } void setLandingType(const ELandingType type) { mLandingType = type; } - void setHiddenAVs(bool hidden_avs) { mHiddenAVs = hidden_avs; } - void setHaveHiddenAVsData(bool have_hidden_av_data) { mHaveHiddenAVData = have_hidden_av_data; } // Remove this once hidden AV feature is fully available grid-wide + void setHiddenAVs(BOOL hidden_avs) { mHiddenAVs = hidden_avs; } + void setHaveNewParcelLimitData(bool have_new_parcel_data) { mHaveNewParcelLimitData = have_new_parcel_data; } // Remove this once hidden AV feature is fully available grid-wide void setAuctionID(U32 auction_id) { mAuctionID = auction_id;} @@ -299,6 +299,8 @@ public: void setDenyAnonymous(BOOL b) { setParcelFlag(PF_DENY_ANONYMOUS, b); } void setDenyAgeUnverified(BOOL b) { setParcelFlag(PF_DENY_AGEUNVERIFIED, b); } void setRestrictPushObject(BOOL b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); } + void setAllowGroupAVSounds(BOOL b) { mAllowGroupAVSounds = b; } + void setAllowAnyAVSounds(BOOL b) { mAllowAnyAVSounds = b; } void setDrawDistance(F32 dist) { mDrawDistance = dist; } void setSalePrice(S32 price) { mSalePrice = price; } @@ -375,8 +377,8 @@ public: const LLVector3& getUserLocation() const { return mUserLocation; } const LLVector3& getUserLookAt() const { return mUserLookAt; } ELandingType getLandingType() const { return mLandingType; } - bool getHiddenAVs() const { return mHiddenAVs; } - bool getHaveHiddenAVsData() const { return mHaveHiddenAVData; } + BOOL getHiddenAVs() const { return mHiddenAVs; } + BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; } // User-specified snapshot const LLUUID& getSnapshotID() const { return mSnapshotID; } @@ -506,6 +508,9 @@ public: BOOL getRegionDenyAgeUnverifiedOverride() const { return mRegionDenyAgeUnverifiedOverride; } + BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; } + BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; } + F32 getDrawDistance() const { return mDrawDistance; } S32 getSalePrice() const { return mSalePrice; } time_t getClaimDate() const { return mClaimDate; } @@ -616,8 +621,8 @@ protected: LLVector3 mUserLocation; LLVector3 mUserLookAt; ELandingType mLandingType; - bool mHiddenAVs; // Avatars are hidden on this parcel from outside it - bool mHaveHiddenAVData; // Remove once hidden AV feature is grid-wide + BOOL mHiddenAVs; // Avatars are hidden on this parcel from outside it + BOOL mHaveNewParcelLimitData; // Remove once hidden AV feature is grid-wide LLTimer mSaleTimerExpires; LLTimer mMediaResetTimer; @@ -673,6 +678,8 @@ protected: BOOL mRegionPushOverride; BOOL mRegionDenyAnonymousOverride; BOOL mRegionDenyAgeUnverifiedOverride; + BOOL mAllowGroupAVSounds; + BOOL mAllowAnyAVSounds; ParcelQuota mQuota; |