summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-05-11 18:33:50 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-05-11 18:33:50 +0300
commit54bbf95f26c7412a0febb9279981c820d2a45c3d (patch)
treed4d12af6957db9ac50b262599e02331fdd8ec7ba /indra/newview
parent80573b362cb37be8affbec556c6efb3298e1041b (diff)
MAINT-5635 PSYS_SRC_MAX_AGE breaks when replacing a particle system without it
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llviewerpartsource.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 7efa821bbf..814060f4f2 100755
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -441,10 +441,20 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
return NULL;
}
+ F32 prev_max_age = pssp->mPartSysData.mMaxAge;
+ F32 prev_start_age = pssp->mPartSysData.mStartAge;
if (!pssp->mPartSysData.unpackBlock(block_num))
{
return NULL;
}
+ else if (pssp->mPartSysData.mMaxAge
+ && (prev_max_age != pssp->mPartSysData.mMaxAge || prev_start_age != pssp->mPartSysData.mStartAge))
+ {
+ // reusing existing pss, so reset time to allow particles to start again
+ pssp->mLastUpdateTime = 0.f;
+ pssp->mLastPartTime = 0.f;
+ }
+
if (pssp->mPartSysData.mTargetUUID.notNull())
{
LLViewerObject *target_objp = gObjectList.findObject(pssp->mPartSysData.mTargetUUID);