diff options
author | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-07-09 17:47:58 -0700 |
---|---|---|
committer | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-07-09 17:47:58 -0700 |
commit | 3733337011c781b6dabe978181d8ae4c5c96188b (patch) | |
tree | 91cda565eda0dd492ce2709ce454b7f9dfa74542 /indra/newview/llviewerobject.cpp | |
parent | 2530b057bb18550ed2825c14988a807ab90d460f (diff) |
Gravity, Friction, Restitution, Density now work with simulator.
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 82147dd339..80d645ca80 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -202,7 +202,6 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mFlags(0), mPhysicsShapeType(0), mPhysicsGravity(0), - mPhysicsMaterialOverride(FALSE), mPhysicsFriction(0), mPhysicsDensity(0), mPhysicsRestitution(0), @@ -5027,11 +5026,10 @@ void LLViewerObject::updateFlags() gMessageSystem->addBOOL("CastsShadows", flagCastShadows() ); gMessageSystem->nextBlock("ExtraPhysics"); gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() ); - gMessageSystem->addF32("PhysicsGravity", getPhysicsGravity() ); - gMessageSystem->addBOOL("PhysicsMaterialOverride", getPhysicsMaterialOverride() ); - gMessageSystem->addF32("PhysicsFriction", getPhysicsFriction() ); - gMessageSystem->addF32("PhysicsDensity", getPhysicsDensity() ); - gMessageSystem->addF32("PhysicsRestitution", getPhysicsRestitution() ); + gMessageSystem->addF32("Density", getPhysicsDensity() ); + gMessageSystem->addF32("Friction", getPhysicsFriction() ); + gMessageSystem->addF32("Restitution", getPhysicsRestitution() ); + gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() ); gMessageSystem->sendReliable( regionp->getHost() ); if (getPhysicsShapeType() != 0) @@ -5079,11 +5077,6 @@ void LLViewerObject::setPhysicsGravity(F32 gravity) mPhysicsGravity = gravity; } -void LLViewerObject::setPhysicsMaterialOverride(BOOL material_override) -{ - mPhysicsMaterialOverride = material_override; -} - void LLViewerObject::setPhysicsFriction(F32 friction) { mPhysicsFriction = friction; @@ -5362,15 +5355,13 @@ public: { // The LLSD message builder doesn't know how to handle U8, so we need to send as S8 and cast U8 type = (U8)curr_object_data["PhysicsShapeType"].asInteger(); - F32 gravity = (F32)curr_object_data["PhysicsGravity"].asReal(); - BOOL material_override = curr_object_data["PhysicsMaterialOverride"].asBoolean(); - F32 friction = (F32)curr_object_data["PhysicsFriction"].asReal(); - F32 density = (F32)curr_object_data["PhysicsDensity"].asReal(); - F32 restitution = (F32)curr_object_data["PhysicsRestitution"].asReal(); + F32 density = (F32)curr_object_data["Density"].asReal(); + F32 friction = (F32)curr_object_data["Friction"].asReal(); + F32 restitution = (F32)curr_object_data["Restitution"].asReal(); + F32 gravity = (F32)curr_object_data["GravityMultiplier"].asReal(); node->getObject()->setPhysicsShapeType(type); node->getObject()->setPhysicsGravity(gravity); - node->getObject()->setPhysicsMaterialOverride(material_override); node->getObject()->setPhysicsFriction(friction); node->getObject()->setPhysicsDensity(density); node->getObject()->setPhysicsRestitution(restitution); |