diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index cb51eee8953ec4ee0129a0ca2b0406e3233a3307..902ff453f3f3f0d8a5d4d0a9a1fb5981bdc22d64 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -647,6 +647,11 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, // Create the object lists initStats(); + initPartitions(); +} + +void LLViewerRegion::initPartitions() +{ //create object partitions //MUST MATCH declaration of eObjectPartitions @@ -669,6 +674,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::scanNewRegion, _1)); } +void LLViewerRegion::reInitPartitions() +{ + std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer()); + mImpl->mObjectPartition.clear(); + initPartitions(); +} void LLViewerRegion::initStats() { diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 24952373cf4aaae0999d93cee240f4c8f26641c0..bc368d6bcdc9c4d63f3d890fd930c1315dd6b4dc 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -458,10 +458,12 @@ class LLViewerRegion final : public LLCapabilityProvider // implements this inte }; void showReleaseNotes(); + void reInitPartitions(); protected: void disconnectAllNeighbors(); void initStats(); + void initPartitions(); public: LLWind mWind;