diff options
author | andreykproductengine <akleshchev@productengine.com> | 2016-06-24 17:08:11 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2016-06-24 17:08:11 +0300 |
commit | 9e985120feb848409e99a27d5c21c12d1b029814 (patch) | |
tree | 6ed10e4be0aed519c1e97f62078a514adcaf0c37 /indra | |
parent | 7b1af4caa90d8b6ffefe3731d6e7b74c498b5bd2 (diff) |
MAINT-6487 After editing an object with a large number of contents, contents in any object will not load until relog.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 4 |
2 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 13cdcd6954..56dcd30a1d 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -133,6 +133,7 @@ std::map<std::string, U32> LLViewerObject::sObjectDataMap; // JC 3/18/2003 const F32 PHYSICS_TIMESTEP = 1.f / 45.f; +const F64 INV_REQUEST_EXPIRE_TIME_SEC = 60.f; static LLTrace::BlockTimerStatHandle FTM_CREATE_OBJECT("Create Object"); @@ -245,7 +246,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mInventory(NULL), mInventorySerialNum(0), mRegionp( regionp ), - mInventoryPending(FALSE), + mInvRequestExpireTime(0.f), mInventoryDirty(FALSE), mDead(FALSE), mOrphaned(FALSE), @@ -2840,6 +2841,15 @@ void LLViewerObject::removeInventoryListener(LLVOInventoryListener* listener) } } +BOOL LLViewerObject::isInventoryPending() +{ + if (mInvRequestExpireTime == 0.f || mInvRequestExpireTime < LLFrameTimer::getTotalSeconds()) + { + return FALSE; + } + return TRUE; +} + void LLViewerObject::clearInventoryListeners() { for_each(mInventoryCallbacks.begin(), mInventoryCallbacks.end(), DeletePointer()); @@ -2878,7 +2888,7 @@ void LLViewerObject::requestInventory() void LLViewerObject::fetchInventoryFromServer() { - if (!mInventoryPending) + if (mInvRequestExpireTime == 0.f || mInvRequestExpireTime < LLFrameTimer::getTotalSeconds()) { delete mInventory; LLMessageSystem* msg = gMessageSystem; @@ -2891,7 +2901,7 @@ void LLViewerObject::fetchInventoryFromServer() msg->sendReliable(mRegionp->getHost()); // this will get reset by dirtyInventory or doInventoryCallback - mInventoryPending = TRUE; + mInvRequestExpireTime = LLFrameTimer::getTotalSeconds() + INV_REQUEST_EXPIRE_TIME_SEC; } } @@ -3107,7 +3117,7 @@ void LLViewerObject::doInventoryCallback() mInventoryCallbacks.erase(curiter); } } - mInventoryPending = FALSE; + mInvRequestExpireTime = 0.f; } void LLViewerObject::removeInventory(const LLUUID& item_id) diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index cb8acfdcf8..b95190c554 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -437,7 +437,7 @@ public: // viewer object has the inventory stored locally. void registerInventoryListener(LLVOInventoryListener* listener, void* user_data); void removeInventoryListener(LLVOInventoryListener* listener); - BOOL isInventoryPending() { return mInventoryPending; } + BOOL isInventoryPending(); void clearInventoryListeners(); bool hasInventoryListeners(); void requestInventory(); @@ -757,7 +757,7 @@ protected: S16 mInventorySerialNum; LLViewerRegion *mRegionp; // Region that this object belongs to. - BOOL mInventoryPending; + F64 mInvRequestExpireTime; BOOL mInventoryDirty; BOOL mDead; BOOL mOrphaned; // This is an orphaned child |