aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerpartsource.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:58 -0500
committerJacek Antonelli2008-08-15 23:44:58 -0500
commit089fc07d207c71ce1401e72f09c31ad8c45872e2 (patch)
tree0028955add042c6f45b47a7b774adeeac9c592cb /linden/indra/newview/llviewerpartsource.cpp
parentSecond Life viewer sources 1.16.0.5 (diff)
downloadmeta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.zip
meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.gz
meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.bz2
meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.xz
Second Life viewer sources 1.17.0.12
Diffstat (limited to 'linden/indra/newview/llviewerpartsource.cpp')
-rw-r--r--linden/indra/newview/llviewerpartsource.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp
index 333c0ac..e440eae 100644
--- a/linden/indra/newview/llviewerpartsource.cpp
+++ b/linden/indra/newview/llviewerpartsource.cpp
@@ -310,7 +310,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
310} 310}
311 311
312// static 312// static
313LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, const S32 block_num) 313LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num)
314{ 314{
315 LLMemType mt(LLMemType::MTYPE_PARTICLES); 315 LLMemType mt(LLMemType::MTYPE_PARTICLES);
316 if (!pssp) 316 if (!pssp)
@@ -319,7 +319,7 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so
319 { 319 {
320 return NULL; 320 return NULL;
321 } 321 }
322 LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp); 322 LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
323 if (!new_pssp->mPartSysData.unpackBlock(block_num)) 323 if (!new_pssp->mPartSysData.unpackBlock(block_num))
324 { 324 {
325 return NULL; 325 return NULL;
@@ -352,12 +352,12 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so
352} 352}
353 353
354 354
355LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, LLDataPacker &dp) 355LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
356{ 356{
357 LLMemType mt(LLMemType::MTYPE_PARTICLES); 357 LLMemType mt(LLMemType::MTYPE_PARTICLES);
358 if (!pssp) 358 if (!pssp)
359 { 359 {
360 LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp); 360 LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
361 if (!new_pssp->mPartSysData.unpack(dp)) 361 if (!new_pssp->mPartSysData.unpack(dp))
362 { 362 {
363 return NULL; 363 return NULL;
@@ -420,8 +420,8 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
420 F32 frac = part.mLastUpdateTime/part.mMaxAge; 420 F32 frac = part.mLastUpdateTime/part.mMaxAge;
421 421
422 LLVector3 center_pos; 422 LLVector3 center_pos;
423 LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep; 423 LLPointer<LLViewerPartSource>& ps = part.mPartSourcep;
424 LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps; 424 LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get();
425 if (!pss->mSourceObjectp.isNull() && !pss->mSourceObjectp->mDrawable.isNull()) 425 if (!pss->mSourceObjectp.isNull() && !pss->mSourceObjectp->mDrawable.isNull())
426 { 426 {
427 part.mPosAgent = pss->mSourceObjectp->getRenderPosition(); 427 part.mPosAgent = pss->mSourceObjectp->getRenderPosition();
@@ -767,3 +767,4 @@ void LLViewerPartSourceChat::setColor(const LLColor4 &color)
767 mColor = color; 767 mColor = color;
768} 768}
769 769
770