From ad350adbcc476de4362deb10a808e6a3b7d854a2 Mon Sep 17 00:00:00 2001 From: phr0z3nt04st Date: Sun, 20 Jun 2010 00:13:56 -0500 Subject: [PATCH] Forgot a if statement on linking. --- indra/newview/llimportobject.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/indra/newview/llimportobject.cpp b/indra/newview/llimportobject.cpp index e0e93118d..145f8c435 100644 --- a/indra/newview/llimportobject.cpp +++ b/indra/newview/llimportobject.cpp @@ -652,15 +652,18 @@ void LLXmlImport::onNewPrim(LLViewerObject* object) } // Link - gMessageSystem->newMessageFast(_PREHASH_ObjectLink); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - gMessageSystem->nextBlockFast(_PREHASH_ObjectData); - gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, sId2localid[from->mParentId]); - gMessageSystem->nextBlockFast(_PREHASH_ObjectData); - gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID()); - gMessageSystem->sendReliable(gAgent.getRegionHost()); + if(!root) + { + gMessageSystem->newMessageFast(_PREHASH_ObjectLink); + gMessageSystem->nextBlockFast(_PREHASH_AgentData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData); + gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, sId2localid[from->mParentId]); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData); + gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID()); + gMessageSystem->sendReliable(gAgent.getRegionHost()); + } if(currPrimIndex + 1 >= (int)sPrims.size()) {