aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerobject.cpp')
-rw-r--r--linden/indra/newview/llviewerobject.cpp45
1 files changed, 38 insertions, 7 deletions
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index b0bd5ce..54114e4 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -94,7 +94,7 @@
94#include "llworld.h" 94#include "llworld.h"
95#include "llui.h" 95#include "llui.h"
96#include "pipeline.h" 96#include "pipeline.h"
97#include "llappviewer.h" 97#include "llviewernetwork.h"
98#include "llvowlsky.h" 98#include "llvowlsky.h"
99 99
100//#define DEBUG_UPDATE_TYPE 100//#define DEBUG_UPDATE_TYPE
@@ -4073,6 +4073,37 @@ BOOL LLViewerObject::isParticleSource() const
4073 return !mPartSourcep.isNull() && !mPartSourcep->isDead(); 4073 return !mPartSourcep.isNull() && !mPartSourcep->isDead();
4074} 4074}
4075 4075
4076void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id)
4077{
4078 if (mPartSourcep)
4079 {
4080 deleteParticleSource();
4081 }
4082
4083 LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::createPSS(this, particle_parameters);
4084 mPartSourcep = pss;
4085
4086 if (mPartSourcep)
4087 {
4088 mPartSourcep->setOwnerUUID(owner_id);
4089
4090 if (mPartSourcep->getImage()->getID() != mPartSourcep->mPartSysData.mPartImageID)
4091 {
4092 LLViewerImage* image;
4093 if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
4094 {
4095 image = gImageList.getImageFromFile("pixiesmall.tga");
4096 }
4097 else
4098 {
4099 image = gImageList.getImage(mPartSourcep->mPartSysData.mPartImageID);
4100 }
4101 mPartSourcep->setImage(image);
4102 }
4103 }
4104 LLViewerPartSim::getInstance()->addPartSource(pss);
4105}
4106
4076void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id) 4107void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id)
4077{ 4108{
4078 if (!mPartSourcep.isNull() && mPartSourcep->isDead()) 4109 if (!mPartSourcep.isNull() && mPartSourcep->isDead())
@@ -4539,7 +4570,7 @@ BOOL LLViewerObject::permYouOwner() const
4539 return TRUE; 4570 return TRUE;
4540#else 4571#else
4541# ifdef TOGGLE_HACKED_GODLIKE_VIEWER 4572# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
4542 if (!LLAppViewer::instance()->isInProductionGrid() 4573 if (!LLViewerLogin::getInstance()->isInProductionGrid()
4543 && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) 4574 && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
4544 { 4575 {
4545 return TRUE; 4576 return TRUE;
@@ -4576,7 +4607,7 @@ BOOL LLViewerObject::permOwnerModify() const
4576 return TRUE; 4607 return TRUE;
4577#else 4608#else
4578# ifdef TOGGLE_HACKED_GODLIKE_VIEWER 4609# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
4579 if (!LLAppViewer::instance()->isInProductionGrid() 4610 if (!LLViewerLogin::getInstance()->isInProductionGrid()
4580 && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) 4611 && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
4581 { 4612 {
4582 return TRUE; 4613 return TRUE;
@@ -4600,7 +4631,7 @@ BOOL LLViewerObject::permModify() const
4600 return TRUE; 4631 return TRUE;
4601#else 4632#else
4602# ifdef TOGGLE_HACKED_GODLIKE_VIEWER 4633# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
4603 if (!LLAppViewer::instance()->isInProductionGrid() 4634 if (!LLViewerLogin::getInstance()->isInProductionGrid()
4604 && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) 4635 && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
4605 { 4636 {
4606 return TRUE; 4637 return TRUE;
@@ -4624,7 +4655,7 @@ BOOL LLViewerObject::permCopy() const
4624 return TRUE; 4655 return TRUE;
4625#else 4656#else
4626# ifdef TOGGLE_HACKED_GODLIKE_VIEWER 4657# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
4627 if (!LLAppViewer::instance()->isInProductionGrid() 4658 if (!LLViewerLogin::getInstance()->isInProductionGrid()
4628 && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) 4659 && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
4629 { 4660 {
4630 return TRUE; 4661 return TRUE;
@@ -4648,7 +4679,7 @@ BOOL LLViewerObject::permMove() const
4648 return TRUE; 4679 return TRUE;
4649#else 4680#else
4650# ifdef TOGGLE_HACKED_GODLIKE_VIEWER 4681# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
4651 if (!LLAppViewer::instance()->isInProductionGrid() 4682 if (!LLViewerLogin::getInstance()->isInProductionGrid()
4652 && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) 4683 && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
4653 { 4684 {
4654 return TRUE; 4685 return TRUE;
@@ -4672,7 +4703,7 @@ BOOL LLViewerObject::permTransfer() const
4672 return TRUE; 4703 return TRUE;
4673#else 4704#else
4674# ifdef TOGGLE_HACKED_GODLIKE_VIEWER 4705# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
4675 if (!LLAppViewer::instance()->isInProductionGrid() 4706 if (!LLViewerLogin::getInstance()->isInProductionGrid()
4676 && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) 4707 && (gAgent.getGodLevel() >= GOD_MAINTENANCE))
4677 { 4708 {
4678 return TRUE; 4709 return TRUE;