diff options
Diffstat (limited to 'linden/indra/newview/llviewerobject.cpp')
-rw-r--r-- | linden/indra/newview/llviewerobject.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 5cb65b6..58d57b5 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp | |||
@@ -639,10 +639,10 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) | |||
639 | } | 639 | } |
640 | 640 | ||
641 | U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | 641 | U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, |
642 | void **user_data, | 642 | void **user_data, |
643 | U32 block_num, | 643 | U32 block_num, |
644 | const EObjectUpdateType update_type, | 644 | const EObjectUpdateType update_type, |
645 | LLDataPacker *dp) | 645 | LLDataPacker *dp) |
646 | { | 646 | { |
647 | LLMemType mt(LLMemType::MTYPE_OBJECT); | 647 | LLMemType mt(LLMemType::MTYPE_OBJECT); |
648 | 648 | ||
@@ -658,6 +658,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | |||
658 | from_region_handle(region_handle, &x, &y); | 658 | from_region_handle(region_handle, &x, &y); |
659 | 659 | ||
660 | llerrs << "Object has invalid region " << x << ":" << y << "!" << llendl; | 660 | llerrs << "Object has invalid region " << x << ":" << y << "!" << llendl; |
661 | return retval; | ||
661 | } | 662 | } |
662 | 663 | ||
663 | U16 time_dilation16; | 664 | U16 time_dilation16; |
@@ -934,7 +935,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | |||
934 | 935 | ||
935 | // Check for appended generic data | 936 | // Check for appended generic data |
936 | S32 data_size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_Data); | 937 | S32 data_size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_Data); |
937 | if (data_size == 0) | 938 | if (data_size <= 0) |
938 | { | 939 | { |
939 | mData = NULL; | 940 | mData = NULL; |
940 | } | 941 | } |
@@ -1757,9 +1758,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | |||
1757 | if (gPingInterpolate) | 1758 | if (gPingInterpolate) |
1758 | { | 1759 | { |
1759 | LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender()); | 1760 | LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender()); |
1760 | F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); | 1761 | if (cdp) |
1761 | LLVector3 diff = getVelocity() * (0.5f*mTimeDilation*(gFrameDTClamped + ((F32)ping_delay)*0.001f)); | 1762 | { |
1762 | new_pos_parent += diff; | 1763 | F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); |
1764 | LLVector3 diff = getVelocity() * (0.5f*mTimeDilation*(gFrameDTClamped + ((F32)ping_delay)*0.001f)); | ||
1765 | new_pos_parent += diff; | ||
1766 | } | ||
1767 | else | ||
1768 | { | ||
1769 | llwarns << "findCircuit() returned NULL; skipping interpolation" << llendl; | ||
1770 | } | ||
1763 | } | 1771 | } |
1764 | 1772 | ||
1765 | ////////////////////////// | 1773 | ////////////////////////// |
@@ -4134,7 +4142,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow | |||
4134 | { | 4142 | { |
4135 | return; | 4143 | return; |
4136 | } | 4144 | } |
4137 | 4145 | ||
4138 | if (audio_uuid.isNull()) | 4146 | if (audio_uuid.isNull()) |
4139 | { | 4147 | { |
4140 | if (mAudioSourcep && mAudioSourcep->isLoop() && !mAudioSourcep->hasPendingPreloads()) | 4148 | if (mAudioSourcep && mAudioSourcep->isLoop() && !mAudioSourcep->hasPendingPreloads()) |
@@ -4169,7 +4177,8 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow | |||
4169 | } | 4177 | } |
4170 | } | 4178 | } |
4171 | 4179 | ||
4172 | if ( mAudioSourcep ) | 4180 | // don't clean up before previous sound is done. Solves: SL-33486 |
4181 | if ( mAudioSourcep && mAudioSourcep->isDone() ) | ||
4173 | { | 4182 | { |
4174 | gAudiop->cleanupAudioSource(mAudioSourcep); | 4183 | gAudiop->cleanupAudioSource(mAudioSourcep); |
4175 | mAudioSourcep = NULL; | 4184 | mAudioSourcep = NULL; |