diff options
| author | Andrew Meadows <leviathan@lindenlab.com> | 2025-03-21 07:18:13 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-21 07:18:13 -0700 | 
| commit | 423df2ba4b731417796478c449e3e8f3d166ef21 (patch) | |
| tree | 847e1405d2306b07b551f7fc23aad73245db3630 | |
| parent | f462037b8e3474115a1f039ce0cd56c98e320227 (diff) | |
prevent erroneous edit of wrong parcel  (#3759)
* prevent erroneous edit of wrong parcel
Fixes jira-archive-internal/issues/70771
[SL-20409] Erroneous Local Parcel Twins -
Parcel Updates Across Region Borders -
unrequested updateDatabaseParcel changes
* remove unused argument in sendParcelPropertiesUpdate()
| -rw-r--r-- | indra/llinventory/llparcel.h | 3 | ||||
| -rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llviewerparcelmgr.h | 2 | 
3 files changed, 13 insertions, 4 deletions
| diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 67d713db1f..759638b956 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -262,6 +262,8 @@ public:      void setMediaURLResetTimer(F32 time);      virtual void    setLocalID(S32 local_id); +    void setRegionID(const LLUUID& id) { mRegionID = id; } +    const LLUUID& getRegionID() const { return mRegionID; }      // blow away all the extra stuff lurking in parcels, including urls, access lists, etc      void clearParcel(); @@ -651,6 +653,7 @@ public:      S32                 mLocalID;      LLUUID              mBanListTransactionID;      LLUUID              mAccessListTransactionID; +    LLUUID              mRegionID;      std::map<LLUUID,LLAccessEntry>  mAccessList;      std::map<LLUUID,LLAccessEntry>  mBanList;      std::map<LLUUID,LLAccessEntry>  mTempBanList; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 8e6657b4b9..1a5c40064a 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1327,12 +1327,12 @@ const S32 LLViewerParcelMgr::getAgentParcelId() const      return INVALID_PARCEL_ID;  } -void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region) +void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel)  {      if(!parcel)          return; -    LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); +    LLViewerRegion *region = LLWorld::getInstance()->getRegionFromID(parcel->getRegionID());      if (!region)          return; @@ -1676,10 +1676,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use      // Actually extract the data.      if (parcel)      { +        // store region_id in the parcel so we can find it again later +        LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender()); +        if (parcel_region) +        { +            parcel->setRegionID(parcel_region->getRegionID()); +        } +          if (local_id == parcel_mgr.mAgentParcel->getLocalID())          {              // Parcels in different regions can have same ids. -            LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender());              LLViewerRegion* agent_region = gAgent.getRegion();              if (parcel_region && agent_region && parcel_region->getRegionID() == agent_region->getRegionID())              { diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 974ea39359..086bca4878 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -219,7 +219,7 @@ public:      // containing the southwest corner of the selection.      // If want_reply_to_update, simulator will send back a ParcelProperties      // message. -    void    sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region = false); +    void    sendParcelPropertiesUpdate(LLParcel* parcel);      // Takes an Access List flag, like AL_ACCESS or AL_BAN      void    sendParcelAccessListUpdate(U32 which); | 
