summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/lscript/lscript_library.h4
-rw-r--r--indra/newview/llviewerobject.cpp17
-rw-r--r--indra/newview/llviewerobject.h1
3 files changed, 19 insertions, 3 deletions
diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h
index 007d36fbcd..ed6e3bc1de 100644
--- a/indra/lscript/lscript_library.h
+++ b/indra/lscript/lscript_library.h
@@ -407,11 +407,11 @@ public:
}
}
- LLScriptLibData(LLVector3 &vec) : mType(LST_VECTOR), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(vec), mQuat(), mListp(NULL)
+ LLScriptLibData(const LLVector3 &vec) : mType(LST_VECTOR), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(vec), mQuat(), mListp(NULL)
{
}
- LLScriptLibData(LLQuaternion &quat) : mType(LST_QUATERNION), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(quat), mListp(NULL)
+ LLScriptLibData(const LLQuaternion &quat) : mType(LST_QUATERNION), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(quat), mListp(NULL)
{
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a09ce3011f..bd8ac806f5 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1406,8 +1406,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Unpack particle system data
//
if (value & 0x8)
+ {
unpackParticleSource(*dp, owner_id);
-
+ }
+ else
+ {
+ deleteParticleSource();
+ }
+
// Mark all extra parameters not used
std::map<U16, ExtraParameter*>::iterator iter;
for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter)
@@ -4063,6 +4069,15 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
}
}
+void LLViewerObject::deleteParticleSource()
+{
+ if (mPartSourcep.notNull())
+ {
+ mPartSourcep->setDead();
+ mPartSourcep = NULL;
+ }
+}
+
// virtual
void LLViewerObject::updateDrawable(BOOL force_damped)
{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 80d3240904..3e885233fd 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -527,6 +527,7 @@ protected:
void unpackParticleSource(const S32 block_num, const LLUUID& owner_id);
void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id);
+ void deleteParticleSource();
private:
void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string