diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-08-04 21:11:32 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-08-04 21:11:32 +0300 |
commit | 6de863132756ffdf3778721ec9dd0f3a15bf464a (patch) | |
tree | 6bc5a3c515fe92cb785b7eaf9b6860e7e7110b61 /indra/newview/llviewerpartsource.cpp | |
parent | 2339e759fc2d6f36a4b9425022a22a747ec55dad (diff) | |
parent | ce3658455230cf392f45cc99f44a737ee59f13bd (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llviewerpartsource.cpp')
-rw-r--r-- | indra/newview/llviewerpartsource.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 7efa821bbf..814060f4f2 100644 --- 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); |