summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llselectmgr.cpp10
-rw-r--r--indra/newview/llviewerobject.cpp17
-rw-r--r--indra/newview/llviewerobject.h2
3 files changed, 16 insertions, 13 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 9b264b81c7..8fa4065fa6 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1997,7 +1997,7 @@ void LLSelectMgr::selectionSetPhysicsType(U8 type)
if (object->permModify())
{
object->setPhysicsShapeType(mType);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2016,7 +2016,7 @@ void LLSelectMgr::selectionSetFriction(F32 friction)
if (object->permModify())
{
object->setPhysicsFriction(mFriction);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2035,7 +2035,7 @@ void LLSelectMgr::selectionSetGravity(F32 gravity )
if (object->permModify())
{
object->setPhysicsGravity(mGravity);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2054,7 +2054,7 @@ void LLSelectMgr::selectionSetDensity(F32 density )
if (object->permModify())
{
object->setPhysicsDensity(mDensity);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
@@ -2073,7 +2073,7 @@ void LLSelectMgr::selectionSetRestitution(F32 restitution)
if (object->permModify())
{
object->setPhysicsRestitution(mRestitution);
- object->updateFlags();
+ object->updateFlags(TRUE);
}
return true;
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 6d493bfcd5..f5fee662e6 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5282,7 +5282,7 @@ bool LLViewerObject::specialHoverCursor() const
|| (mClickAction != 0);
}
-void LLViewerObject::updateFlags()
+void LLViewerObject::updateFlags(BOOL physics_changed)
{
LLViewerRegion* regionp = getRegion();
if(!regionp) return;
@@ -5295,12 +5295,15 @@ void LLViewerObject::updateFlags()
gMessageSystem->addBOOL("IsTemporary", flagTemporaryOnRez() );
gMessageSystem->addBOOL("IsPhantom", flagPhantom() );
gMessageSystem->addBOOL("CastsShadows", flagCastShadows() );
- gMessageSystem->nextBlock("ExtraPhysics");
- gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() );
- gMessageSystem->addF32("Density", getPhysicsDensity() );
- gMessageSystem->addF32("Friction", getPhysicsFriction() );
- gMessageSystem->addF32("Restitution", getPhysicsRestitution() );
- gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() );
+ if (physics_changed)
+ {
+ gMessageSystem->nextBlock("ExtraPhysics");
+ gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() );
+ gMessageSystem->addF32("Density", getPhysicsDensity() );
+ gMessageSystem->addF32("Friction", getPhysicsFriction() );
+ gMessageSystem->addF32("Restitution", getPhysicsRestitution() );
+ gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() );
+ }
gMessageSystem->sendReliable( regionp->getHost() );
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index e417343bec..21198f7dd1 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -488,7 +488,7 @@ public:
void setRegion(LLViewerRegion *regionp);
virtual void updateRegion(LLViewerRegion *regionp);
- void updateFlags();
+ void updateFlags(BOOL physics_changed = FALSE);
BOOL setFlags(U32 flag, BOOL state);
void setPhysicsShapeType(U8 type);
void setPhysicsGravity(F32 gravity);