summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsim.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-09-14 21:13:20 +0000
committerDon Kjer <don@lindenlab.com>2007-09-14 21:13:20 +0000
commit13c391f1984bb8cb9d67a7729af2ee5714409215 (patch)
tree112edff1d25adabb4893e6746ba76a4182865f8a /indra/newview/llviewerpartsim.cpp
parentb3d807d5ff8dca6c891e9a5e0ddc7bc147d69f8c (diff)
EFFECTIVE MERGE: svn merge -r 68118:68999 svn+ssh://svn/svn/linden/branches/maintenance
ACTUAL MERGE: svn merge -r 69685:69687 svn+ssh://svn/svn/linden/branches/release-r69649-maintenance-sync EQUIVALENT TO: svn merge -r 68118:69663 svn+ssh://svn/svn/linden/branches/maintenance-r68999
Diffstat (limited to 'indra/newview/llviewerpartsim.cpp')
-rw-r--r--indra/newview/llviewerpartsim.cpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 476326147c..940826f331 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -397,6 +397,18 @@ void LLViewerPartGroup::shift(const LLVector3 &offset)
}
}
+void LLViewerPartGroup::removeParticlesByID(const U32 source_id)
+{
+ LLMemType mt(LLMemType::MTYPE_PARTICLES);
+ S32 end = (S32) mParticles.size();
+ for (int i = 0; i < end; i++)
+ {
+ if(mParticles[i]->mPartSourcep->getID() == source_id)
+ {
+ mParticles[i]->mFlags = LLViewerPart::LL_PART_DEAD_MASK;
+ }
+ }
+}
//////////////////////////////////
//
@@ -664,6 +676,10 @@ void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep)
mViewerPartSources.push_back(sourcep);
}
+void LLViewerPartSim::removeLastCreatedSource()
+{
+ mViewerPartSources.pop_back();
+}
void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
{
@@ -680,16 +696,32 @@ void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
}
}
-void LLViewerPartSim::cleanMutedParticles(const LLUUID& task_id)
+void LLViewerPartSim::clearParticlesByID(const U32 system_id)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
- for (source_list_t::iterator i = mViewerPartSources.begin(); i != mViewerPartSources.end(); )
+ for (group_list_t::iterator g = mViewerPartGroups.begin(); g != mViewerPartGroups.end(); ++g)
{
- source_list_t::iterator iter = i++;
+ (*g)->removeParticlesByID(system_id);
+ }
+ for (source_list_t::iterator i = mViewerPartSources.begin(); i != mViewerPartSources.end(); ++i)
+ {
+ if ((*i)->getID() == system_id)
+ {
+ (*i)->setDead();
+ break;
+ }
+ }
+
+}
+void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id)
+{
+ LLMemType mt(LLMemType::MTYPE_PARTICLES);
+ for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter)
+ {
if ((*iter)->getOwnerUUID() == task_id)
{
- i = mViewerPartSources.erase(iter);
+ clearParticlesByID((*iter)->getID());
}
}
}