summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2008-04-30 23:30:09 +0000
committerJames Cook <james@lindenlab.com>2008-04-30 23:30:09 +0000
commit36fccc3888c5dc318a8a235da8a5cae4faeb637d (patch)
tree021e439fe9fa3a285062d70bf0b8c0f799471681 /indra/newview/llviewerobject.cpp
parentcf2a96375f62316b98c2dddd57f812f7565584be (diff)
svn merge -r 86190:86191 maint-ui-11-merge (EFFECTIVE MERGE: -r 84579:85724 maint-ui-11-qa).
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 30668172f1..227a0d9ebe 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4068,6 +4068,37 @@ BOOL LLViewerObject::isParticleSource() const
return !mPartSourcep.isNull() && !mPartSourcep->isDead();
}
+void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id)
+{
+ if (mPartSourcep)
+ {
+ deleteParticleSource();
+ }
+
+ LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::createPSS(this, particle_parameters);
+ mPartSourcep = pss;
+
+ if (mPartSourcep)
+ {
+ mPartSourcep->setOwnerUUID(owner_id);
+
+ if (mPartSourcep->getImage()->getID() != mPartSourcep->mPartSysData.mPartImageID)
+ {
+ LLViewerImage* image;
+ if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
+ {
+ image = gImageList.getImageFromFile("pixiesmall.tga");
+ }
+ else
+ {
+ image = gImageList.getImage(mPartSourcep->mPartSysData.mPartImageID);
+ }
+ mPartSourcep->setImage(image);
+ }
+ }
+ LLViewerPartSim::getInstance()->addPartSource(pss);
+}
+
void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id)
{
if (!mPartSourcep.isNull() && mPartSourcep->isDead())