Skip to content
Snippets Groups Projects
Commit a350582f authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix selection beams not smoothly interpolating position

parent 53bfe16a
No related branches found
No related tags found
No related merge requests found
......@@ -706,8 +706,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color)
void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
{
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep;
LLViewerPartSourceBeam *psb = (LLViewerPartSourceBeam *)ps;
if (psb->mSourceObjectp.isNull())
......@@ -736,6 +734,7 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
target_pos_agent = psb->mTargetObjectp->getRenderPosition();
}
F32 frac = part.mLastUpdateTime / part.mMaxAge;
part.mPosAgent = (1.f - frac) * source_pos_agent;
if (psb->mTargetObjectp.isNull())
{
......@@ -796,7 +795,7 @@ void LLViewerPartSourceBeam::update(const F32 dt)
}
LLViewerPart* part = new LLViewerPart();
part->init(this, mImagep, NULL);
part->init(this, mImagep, updatePart);
part->mFlags = LLPartData::LL_PART_INTERP_COLOR_MASK |
LLPartData::LL_PART_INTERP_SCALE_MASK |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment