MAINT-6487 After editing an object with a large number of contents, contents in any object will not load until relog.
parent
bc11ed792c
commit
32055eee4d
|
|
@ -145,6 +145,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");
|
||||
|
||||
|
|
@ -268,7 +269,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),
|
||||
|
|
@ -2905,6 +2906,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());
|
||||
|
|
@ -2943,7 +2953,7 @@ void LLViewerObject::requestInventory()
|
|||
|
||||
void LLViewerObject::fetchInventoryFromServer()
|
||||
{
|
||||
if (!mInventoryPending)
|
||||
if (mInvRequestExpireTime == 0.f || mInvRequestExpireTime < LLFrameTimer::getTotalSeconds())
|
||||
{
|
||||
delete mInventory;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
|
@ -2956,7 +2966,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3181,7 +3191,7 @@ void LLViewerObject::doInventoryCallback()
|
|||
mInventoryCallbacks.erase(curiter);
|
||||
}
|
||||
}
|
||||
mInventoryPending = FALSE;
|
||||
mInvRequestExpireTime = 0.f;
|
||||
}
|
||||
|
||||
void LLViewerObject::removeInventory(const LLUUID& item_id)
|
||||
|
|
|
|||
|
|
@ -447,7 +447,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();
|
||||
|
|
@ -774,7 +774,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue