diff options
| author | Kitty Barnett <develop@catznip.com> | 2012-12-12 21:36:36 +0100 | 
|---|---|---|
| committer | Kitty Barnett <develop@catznip.com> | 2012-12-12 21:36:36 +0100 | 
| commit | ef301c59832025240a20f9959008a33dc52233f9 (patch) | |
| tree | dbf56f2a4e6057a02602ecbe78d1e9c5572c65cb | |
| parent | 3cd04749128f3daa185bca477552a566bc287a8e (diff) | |
Don't call setTEMaterialID() while processing a PUT response; the region will send its own ObjectUpdate message
| -rw-r--r-- | indra/newview/llmaterialmgr.cpp | 31 | ||||
| -rw-r--r-- | indra/newview/llmaterialmgr.h | 2 | 
2 files changed, 7 insertions, 26 deletions
| diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index 77c0102fa7..f623ca11ec 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -354,7 +354,7 @@ void LLMaterialMgr::onGetAllResponse(bool success, const LLSD& content, const LL  	mGetAllPending.erase(region_id);	// Invalidates region_id  } -void LLMaterialMgr::onPutResponse(bool success, const LLSD& content, const LLUUID& object_id) +void LLMaterialMgr::onPutResponse(bool success, const LLSD& content)  {  	if (!success)  	{ @@ -362,13 +362,6 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content, const LLUUI  		return;  	} -	LLViewerObject* objectp = gObjectList.findObject(object_id); -	if (!objectp) -	{ -		LL_WARNS("debugMaterials") << "Received PUT response for unknown object" << LL_ENDL; -		return; -	} -  	llassert(content.isMap());  	llassert(content.has(MATERIALS_CAP_ZIP_FIELD));  	llassert(content[MATERIALS_CAP_ZIP_FIELD].isBinary()); @@ -394,25 +387,17 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content, const LLUUI  			llassert(face_data.has(MATERIALS_CAP_OBJECT_ID_FIELD));  			llassert(face_data[MATERIALS_CAP_OBJECT_ID_FIELD].isInteger()); -			U32 local_id = face_data[MATERIALS_CAP_OBJECT_ID_FIELD].asInteger(); -			if (objectp->getLocalID() != local_id) -			{ -				LL_ERRS("debugMaterials") << "Received PUT response for wrong object" << LL_ENDL; -				continue; -			} +//			U32 local_id = face_data[MATERIALS_CAP_OBJECT_ID_FIELD].asInteger();  			llassert(face_data.has(MATERIALS_CAP_FACE_FIELD));  			llassert(face_data[MATERIALS_CAP_FACE_FIELD].isInteger()); -			S32 te = face_data[MATERIALS_CAP_FACE_FIELD].asInteger(); +//			S32 te = face_data[MATERIALS_CAP_FACE_FIELD].asInteger();  			llassert(face_data.has(MATERIALS_CAP_MATERIAL_ID_FIELD));  			llassert(face_data[MATERIALS_CAP_MATERIAL_ID_FIELD].isBinary()); -			LLMaterialID material_id(face_data[MATERIALS_CAP_MATERIAL_ID_FIELD].asBinary()); +//			LLMaterialID material_id(face_data[MATERIALS_CAP_MATERIAL_ID_FIELD].asBinary()); -			LL_INFOS("debugMaterials") << "Setting material '" << material_id.asString() << "' on object '" << local_id  -				<< "' face " << te << LL_ENDL; - -			objectp->setTEMaterialID(te, material_id); +			// *TODO: do we really still need to process this?  		}  	}  } @@ -593,9 +578,6 @@ void LLMaterialMgr::processPutQueue()  				faceData[MATERIALS_CAP_MATERIAL_FIELD] = itFace->second.asLLSD();  			}  			facesData.append(faceData); - -			LL_INFOS("debugMaterials") << "Requesting material change on object '" << faceData[MATERIALS_CAP_OBJECT_ID_FIELD].asInteger() -				<< "' face " << faceData[MATERIALS_CAP_FACE_FIELD].asInteger() << LL_ENDL;  		}  		LLSD materialsData = LLSD::emptyMap(); @@ -620,8 +602,7 @@ void LLMaterialMgr::processPutQueue()  			LLSD putData = LLSD::emptyMap();  			putData[MATERIALS_CAP_ZIP_FIELD] = materialBinary; -			// *HACK: the viewer can't lookup the local object id the cap returns so we'll pass the object's uuid along -			LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("PUT", capURL, boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2, object_id)); +			LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("PUT", capURL, boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2));  			LLHTTPClient::put(capURL, putData, materialsResponder);  		}  	} diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h index b8722ce90e..1066f3ef37 100644 --- a/indra/newview/llmaterialmgr.h +++ b/indra/newview/llmaterialmgr.h @@ -60,7 +60,7 @@ protected:  	void processGetAllQueue();  	void onGetAllResponse(bool success, const LLSD& content, const LLUUID& region_id);  	void processPutQueue(); -	void onPutResponse(bool success, const LLSD& content, const LLUUID& object_id); +	void onPutResponse(bool success, const LLSD& content);  protected:  	typedef std::set<LLMaterialID> material_queue_t; | 
