summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-19 23:19:55 -0500
committerDave Parks <davep@lindenlab.com>2010-10-19 23:19:55 -0500
commit30b44b238ba6ff8ff6dc29161f3ff6ee85a27f06 (patch)
treead0894cb9e503872b688271006cb94e9a077a07c /indra/newview/llviewerobject.cpp
parent94c1670934bc3a00e45823784cb8c25dea7908f0 (diff)
First stab at using GetObjectPhysicsData
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index ee8e2cebbf..e0b56767cd 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -237,6 +237,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mPhysicsCost(0.f),
mLinksetPhysicsCost(0.f),
mCostStale(true),
+ mPhysicsShapeUnknown(true),
mAttachmentItemID(LLUUID::null)
{
if (!is_global)
@@ -5185,6 +5186,7 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
void LLViewerObject::setPhysicsShapeType(U8 type)
{
+ mPhysicsShapeUnknown = false;
mPhysicsShapeType = type;
}
@@ -5208,6 +5210,17 @@ void LLViewerObject::setPhysicsRestitution(F32 restitution)
mPhysicsRestitution = restitution;
}
+U8 LLViewerObject::getPhysicsShapeType() const
+{
+ if (mPhysicsShapeUnknown)
+ {
+ mPhysicsShapeUnknown = false;
+ gObjectList.updatePhysicsFlags(this);
+ }
+
+ return mPhysicsShapeType;
+}
+
void LLViewerObject::applyAngularVelocity(F32 dt)
{
//do target omega here