summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerpartsource.cpp')
-rw-r--r--indra/newview/llviewerpartsource.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 7e9f3e2fa9..b6f16d1002 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -466,6 +466,25 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
}
}
+
+/* static */
+LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters)
+{
+ LLMemType mt(LLMemType::MTYPE_PARTICLES);
+
+ LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
+
+ new_pssp->mPartSysData = particle_parameters;
+
+ if (new_pssp->mPartSysData.mTargetUUID.notNull())
+ {
+ LLViewerObject *target_objp = gObjectList.findObject(new_pssp->mPartSysData.mTargetUUID);
+ new_pssp->setTargetObject(target_objp);
+ }
+ return new_pssp;
+}
+
+
void LLViewerPartSourceScript::setImage(LLViewerImage *imagep)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);