aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:27 -0500
committerJacek Antonelli2008-08-15 23:45:27 -0500
commita8a62201ba762e98dff92cf49033e577fc34d8d4 (patch)
tree11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/newview/llviewerobject.cpp
parentSecond Life viewer sources 1.18.6.4-RC (diff)
downloadmeta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz
Second Life viewer sources 1.19.0.0
Diffstat (limited to 'linden/indra/newview/llviewerobject.cpp')
-rw-r--r--linden/indra/newview/llviewerobject.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index 8dcf29b..50ab57c 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -2343,8 +2343,19 @@ void LLViewerObject::requestInventory()
2343 doInventoryCallback(); 2343 doInventoryCallback();
2344 } 2344 }
2345 // throw away duplicate requests 2345 // throw away duplicate requests
2346 else if (! mInventoryPending) 2346 else
2347 { 2347 {
2348 fetchInventoryFromServer();
2349 }
2350}
2351
2352void LLViewerObject::fetchInventoryFromServer()
2353{
2354 if (!mInventoryPending)
2355 {
2356 delete mInventory;
2357 mInventory = NULL;
2358 mInventoryDirty = FALSE;
2348 LLMessageSystem* msg = gMessageSystem; 2359 LLMessageSystem* msg = gMessageSystem;
2349 msg->newMessageFast(_PREHASH_RequestTaskInventory); 2360 msg->newMessageFast(_PREHASH_RequestTaskInventory);
2350 msg->nextBlockFast(_PREHASH_AgentData); 2361 msg->nextBlockFast(_PREHASH_AgentData);
@@ -2631,6 +2642,9 @@ LLInventoryObject* LLViewerObject::getInventoryRoot()
2631 2642
2632LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id) 2643LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id)
2633{ 2644{
2645 if (mInventoryDirty)
2646 llwarns << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << llendl;
2647
2634 LLViewerInventoryItem* rv = NULL; 2648 LLViewerInventoryItem* rv = NULL;
2635 if(mInventory) 2649 if(mInventory)
2636 { 2650 {
@@ -2717,7 +2731,7 @@ BOOL LLViewerObject::updateLOD()
2717 // Update volume of looping sounds 2731 // Update volume of looping sounds
2718 if (mAudioSourcep && mAudioSourcep->isLoop()) 2732 if (mAudioSourcep && mAudioSourcep->isLoop())
2719 { 2733 {
2720 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); 2734 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (mAudioGain * gSavedSettings.getF32("AudioLevelSFX"));
2721 mAudioSourcep->setGain(volume); 2735 mAudioSourcep->setGain(volume);
2722 } 2736 }
2723 return FALSE; 2737 return FALSE;
@@ -4228,7 +4242,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
4228 { 4242 {
4229 BOOL queue = flags & LL_SOUND_FLAG_QUEUE; 4243 BOOL queue = flags & LL_SOUND_FLAG_QUEUE;
4230 mAudioGain = gain; 4244 mAudioGain = gain;
4231 F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX"); 4245 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gain * gSavedSettings.getF32("AudioLevelSFX");
4232 mAudioSourcep->setGain(volume); 4246 mAudioSourcep->setGain(volume);
4233 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); 4247 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP);
4234 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); 4248 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER);
@@ -4267,7 +4281,7 @@ void LLViewerObject::adjustAudioGain(const F32 gain)
4267 if (mAudioSourcep) 4281 if (mAudioSourcep)
4268 { 4282 {
4269 mAudioGain = gain; 4283 mAudioGain = gain;
4270 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); 4284 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
4271 mAudioSourcep->setGain(volume); 4285 mAudioSourcep->setGain(volume);
4272 } 4286 }
4273} 4287}