From 30b44b238ba6ff8ff6dc29161f3ff6ee85a27f06 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 19 Oct 2010 23:19:55 -0500 Subject: First stab at using GetObjectPhysicsData --- indra/newview/llviewerobject.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llviewerobject.cpp') 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 -- cgit v1.2.3