summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsim.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-03-13 17:07:22 -0500
committerDave Parks <davep@lindenlab.com>2013-03-13 17:07:22 -0500
commit08ae21f52dbbe6245ac8deee0fdfd5df4d3dba53 (patch)
tree66b939268e3253acea62b8a4a08d1ad8db058d87 /indra/newview/llviewerpartsim.cpp
parent7a71c094b95bbc6b821b93e2be7e18d19c3cff11 (diff)
MAINT-2410 Extra Particle Parameters -- viewer implementation
Reviewed by Kelly and Graham
Diffstat (limited to 'indra/newview/llviewerpartsim.cpp')
-rw-r--r--indra/newview/llviewerpartsim.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 61cdfd7818..21f1d2619c 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -80,12 +80,31 @@ LLViewerPart::LLViewerPart() :
mImagep(NULL)
{
mPartSourcep = NULL;
-
+ mParent = NULL;
+ mChild = NULL;
++LLViewerPartSim::sParticleCount2 ;
}
LLViewerPart::~LLViewerPart()
{
+ if (mPartSourcep.notNull() && mPartSourcep->mLastPart == this)
+ {
+ mPartSourcep->mLastPart = NULL;
+ }
+
+ //patch up holes in the ribbon
+ if (mParent)
+ {
+ llassert(mParent->mChild == this);
+ mParent->mChild = mChild;
+ }
+
+ if (mChild)
+ {
+ llassert (mChild->mParent == this);
+ mChild->mParent = mParent;
+ }
+
mPartSourcep = NULL;
--LLViewerPartSim::sParticleCount2 ;
@@ -367,6 +386,9 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
part->mScale += frac*part->mEndScale;
}
+ // Do glow interpolation
+ part->mGlow.mV[3] = (U8) (lerp(part->mStartGlow, part->mEndGlow, frac)*255.f);
+
// Set the last update time to now.
part->mLastUpdateTime = cur_time;
@@ -623,6 +645,9 @@ void LLViewerPartSim::updateSimulation()
{
static LLFrameTimer update_timer;
+ //reset VBO cursor
+ LLVOPartGroup::sVBSlotCursor = 0;
+
const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f);
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES)))