diff options
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 88d5d50845..2d9614d5c3 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -84,11 +84,10 @@ #include "llvoavatar.h" #include "llvoavatarself.h" #include "llvograss.h" -#include "llvoground.h" +#include "llvosky.h" #include "llvolume.h" #include "llvolumemessage.h" #include "llvopartgroup.h" -#include "llvosky.h" #include "llvosurfacepatch.h" #include "llvotree.h" #include "llvovolume.h" @@ -163,7 +162,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco && pcode != LL_VO_VOID_WATER && pcode != LL_VO_WL_SKY && pcode != LL_VO_SKY - && pcode != LL_VO_GROUND && pcode != LL_VO_PART_GROUP ) { @@ -235,8 +233,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco res = new LLVOVoidWater(id, pcode, regionp); break; case LL_VO_WATER: res = new LLVOWater(id, pcode, regionp); break; - case LL_VO_GROUND: - res = new LLVOGround(id, pcode, regionp); break; case LL_VO_PART_GROUP: res = new LLVOPartGroup(id, pcode, regionp); break; case LL_VO_HUD_PART_GROUP: @@ -3248,36 +3244,39 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) return; } - LLFilenameAndTask* ft = new LLFilenameAndTask; - ft->mTaskID = task_id; // we can receive multiple task updates simultaneously, make sure we will not rewrite newer with older update - msg->getS16Fast(_PREHASH_InventoryData, _PREHASH_Serial, ft->mSerial); + S16 serial = 0; + msg->getS16Fast(_PREHASH_InventoryData, _PREHASH_Serial, serial); - if (ft->mSerial == object->mInventorySerialNum - && ft->mSerial < object->mExpectedInventorySerialNum) + if (serial == object->mInventorySerialNum + && serial < object->mExpectedInventorySerialNum) { // Loop Protection. // We received same serial twice. // Viewer did some changes to inventory that couldn't be saved server side // or something went wrong to cause serial to be out of sync. // Drop xfer and restart after some time, assign server's value as expected - LL_WARNS() << "Task inventory serial might be out of sync, server serial: " << ft->mSerial << " client expected serial: " << object->mExpectedInventorySerialNum << LL_ENDL; - object->mExpectedInventorySerialNum = ft->mSerial; + LL_WARNS() << "Task inventory serial might be out of sync, server serial: " << serial << " client expected serial: " << object->mExpectedInventorySerialNum << LL_ENDL; + object->mExpectedInventorySerialNum = serial; object->fetchInventoryDelayed(INVENTORY_UPDATE_WAIT_TIME_DESYNC); } - else if (ft->mSerial < object->mExpectedInventorySerialNum) + else if (serial < object->mExpectedInventorySerialNum) { // Out of date message, record to current serial for loop protection, but do not load it // Drop xfer and restart after some time - if (ft->mSerial < object->mInventorySerialNum) + if (serial < object->mInventorySerialNum) { LL_WARNS() << "Task serial decreased. Potentially out of order packet or desync." << LL_ENDL; } - object->mInventorySerialNum = ft->mSerial; + object->mInventorySerialNum = serial; object->fetchInventoryDelayed(INVENTORY_UPDATE_WAIT_TIME_OUTDATED); } - else if (ft->mSerial >= object->mExpectedInventorySerialNum) + else if (serial >= object->mExpectedInventorySerialNum) { + LLFilenameAndTask* ft = new LLFilenameAndTask; + ft->mTaskID = task_id; + ft->mSerial = serial; + // We received version we expected or newer. Load it. object->mInventorySerialNum = ft->mSerial; object->mExpectedInventorySerialNum = ft->mSerial; @@ -3312,7 +3311,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) object->mRegionp->getHost(), TRUE, &LLViewerObject::processTaskInvFile, - (void**)ft, + (void**)ft, // This takes ownership of ft LLXferManager::HIGH_PRIORITY); if (object->mInvRequestState == INVENTORY_XFER) { |