void FSLSLBridge :: startCreation() { ////are we already in conversation with a bridge? ////must have already received a URL call from a bridge. //if (mpBridge != NULL) //{ // return; //} //if bridge object doesn't exist - create and attach it, update script. LLUUID catID = findFSCategory(); LLViewerInventoryItem* fsBridge = findInvObject(mCurrentFullName, catID, LLAssetType::AT_OBJECT); if (fsBridge == NULL) { initCreationStep(); } else { //TODO need versioning - see isOldBridgeVersion() mpBridge = fsBridge; if (!isItemAttached(mpBridge->getUUID())) LLAttachmentsMgr::instance().addAttachment(mpBridge->getUUID(), BRIDGE_POINT, FALSE, TRUE); } }
// Gets called by the Init, when inventory loaded. void FSLSLBridge::startCreation() { if (!isAgentAvatarValid()) { llwarns << "AgentAvatar is not valid" << llendl; return; } llinfos << "startCreation called. gInventory.isInventoryUsable=" << gInventory.isInventoryUsable() << llendl; //if bridge object doesn't exist - create and attach it, update script. LLUUID catID = findFSCategory(); LLViewerInventoryItem* fsBridge = findInvObject(mCurrentFullName, catID, LLAssetType::AT_OBJECT); //detach everything else detachOtherBridges(); if (fsBridge == NULL) { llinfos << "Bridge not found in inventory, creating new one..." << llendl; initCreationStep(); } else { //TODO need versioning - see isOldBridgeVersion() mpBridge = fsBridge; if (!isItemAttached(mpBridge->getUUID())) { if (!LLAppearanceMgr::instance().getIsInCOF(mpBridge->getUUID())) { //Is this a valid bridge - wear it. LLAttachmentsMgr::instance().addAttachment(mpBridge->getUUID(), BRIDGE_POINT, FALSE, TRUE); llinfos << "Bridge not attached but found in inventory, reattaching..." << llendl; //from here, the attach shoould report to ProcessAttach and make sure bridge is valid. } else { llinfos << "Bridge not found but in CoF. Waiting for automatic attach..." << llendl; } } } }