summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 7b94e49a2a..f18fee3ede 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -53,7 +53,6 @@
#include "llprimitive.h"
#include "llquantize.h"
#include "llregionhandle.h"
-#include "llsdserialize.h"
#include "lltree_common.h"
#include "llxfermanager.h"
#include "message.h"
@@ -200,7 +199,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mGLName(0),
mbCanSelect(TRUE),
mFlags(0),
- mPhysicsShapeType(0),
+ mPhysicsRep(0),
mDrawable(),
mCreateSelected(FALSE),
mRenderMedia(FALSE),
@@ -4964,10 +4963,10 @@ void LLViewerObject::updateFlags()
gMessageSystem->addBOOL("IsPhantom", flagPhantom() );
gMessageSystem->addBOOL("CastsShadows", flagCastShadows() );
gMessageSystem->nextBlock("ExtraPhysics");
- gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() );
+ gMessageSystem->addU8("PhysicsRep", getPhysicsRep() );
gMessageSystem->sendReliable( regionp->getHost() );
- if (getPhysicsShapeType() != 0)
+ if (getPhysicsRep() != 0)
{
llwarns << "sent non default physics rep" << llendl;
}
@@ -5002,9 +5001,9 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
return setit;
}
-void LLViewerObject::setPhysicsShapeType(U8 type)
+void LLViewerObject::setPhysicsRep(U8 rep)
{
- mPhysicsShapeType = type;
+ mPhysicsRep = rep;
updateFlags();
}
@@ -5218,7 +5217,7 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
return ;
}
-
+#include "../llcommon/llsdserialize.h"
class ObjectPhysicsProperties : public LLHTTPNode
{
public:
@@ -5232,8 +5231,11 @@ public:
for ( S32 i = 0; i < numEntries; i++ )
{
- LLSD& currObjectData = objectData[i];
- U32 localID = currObjectData["LocalID"].asInteger();
+ U32 localID = objectData[i]["LocalID"].asInteger();
+
+ std::ostringstream string;
+ LLSDSerialize::serialize( input, string, LLSDSerialize::LLSD_XML, LLSDFormatter::OPTIONS_PRETTY);
+ llinfos << string.str() << llendl;
// Iterate through nodes at end, since it can be on both the regular AND hover list
struct f : public LLSelectedNodeFunctor
@@ -5248,12 +5250,11 @@ public:
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
+ U8 physicsRepSpec = (U8)objectData[i]["PhysicsRepSpec"].asInteger();
+
if (node)
{
- // The LLSD message builder doesn't know how to handle U8, so we need to send as S8 and cast
- U8 physicsShapeType = (U8)currObjectData["PhysicsShapeType"].asInteger();
-
- node->getObject()->setPhysicsShapeType(physicsShapeType);
+ node->getObject()->setPhysicsRep(physicsRepSpec);
}
}