void LLAudioSource::updatePriority() { if (isAmbient()) { mPriority = 1.f; } else if (isMuted()) { mPriority = 0.f; } else { // Priority is based on distance LLVector3 dist_vec; dist_vec.setVec(getPositionGlobal()); if (gAudiop) { dist_vec -= gAudiop->getListenerPos(); } F32 dist_squared = llmax(1.f, dist_vec.magVecSquared()); mPriority = mGain / dist_squared; } }
void LLPreviewLandmark::draw() { const LLInventoryItem *item = getItem(); if( item && !mLandmark ) { mLandmark = gLandmarkList.getAsset( item->getAssetUUID() ); if(mLandmark && mPlacePanel) { LLVector3 pos_region = mLandmark->getRegionPos(); // always have this LLUUID landmark_asset_id = item->getAssetUUID(); // always have this LLUUID region_id; mLandmark->getRegionID(region_id); // might find null? LLVector3d pos_global = getPositionGlobal(); // might be 0 mPlacePanel->displayParcelInfo(pos_region, landmark_asset_id, region_id, pos_global); } } LLPreview::draw(); }