MAINT-678 Fix for inconsistent data in physics shape display
parent
ba8ddcf241
commit
39ee498af0
|
|
@ -3495,6 +3495,8 @@ void renderPhysicsShapes(LLSpatialGroup* group)
|
|||
LLViewerObject* object = drawable->getVObj();
|
||||
if (object && object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH)
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.multMatrix((F32*) object->getRegion()->mRenderMatrix.mMatrix);
|
||||
//push face vertices for terrain
|
||||
for (S32 i = 0; i < drawable->getNumFaces(); ++i)
|
||||
{
|
||||
|
|
@ -3516,6 +3518,7 @@ void renderPhysicsShapes(LLSpatialGroup* group)
|
|||
}
|
||||
}
|
||||
}
|
||||
gGL.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5363,8 +5363,11 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
|
|||
void LLViewerObject::setPhysicsShapeType(U8 type)
|
||||
{
|
||||
mPhysicsShapeUnknown = false;
|
||||
mPhysicsShapeType = type;
|
||||
mCostStale = true;
|
||||
if (type != mPhysicsShapeType)
|
||||
{
|
||||
mPhysicsShapeType = type;
|
||||
mCostStale = true;
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerObject::setPhysicsGravity(F32 gravity)
|
||||
|
|
@ -5391,7 +5394,6 @@ U8 LLViewerObject::getPhysicsShapeType() const
|
|||
{
|
||||
if (mPhysicsShapeUnknown)
|
||||
{
|
||||
mPhysicsShapeUnknown = false;
|
||||
gObjectList.updatePhysicsFlags(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,11 +80,9 @@
|
|||
extern F32 gMinObjectDistance;
|
||||
extern BOOL gAnimateTextures;
|
||||
|
||||
void dialog_refresh_all();
|
||||
#define MAX_CONCURRENT_PHYSICS_REQUESTS 256
|
||||
|
||||
#define CULL_VIS
|
||||
//#define ORPHAN_SPAM
|
||||
//#define IGNORE_DEAD
|
||||
void dialog_refresh_all();
|
||||
|
||||
// Global lists of objects - should go away soon.
|
||||
LLViewerObjectList gObjectList;
|
||||
|
|
@ -1083,8 +1081,6 @@ void LLViewerObjectList::fetchObjectCosts()
|
|||
LLSD id_list;
|
||||
U32 object_index = 0;
|
||||
|
||||
U32 count = 0;
|
||||
|
||||
for (
|
||||
std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
|
||||
iter != mStaleObjectCost.end();
|
||||
|
|
@ -1101,7 +1097,7 @@ void LLViewerObjectList::fetchObjectCosts()
|
|||
|
||||
mStaleObjectCost.erase(iter++);
|
||||
|
||||
if (count++ >= 450)
|
||||
if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -1146,7 +1142,7 @@ void LLViewerObjectList::fetchPhysicsFlags()
|
|||
for (
|
||||
std::set<LLUUID>::iterator iter = mStalePhysicsFlags.begin();
|
||||
iter != mStalePhysicsFlags.end();
|
||||
++iter)
|
||||
)
|
||||
{
|
||||
// Check to see if a request for this object
|
||||
// has already been made.
|
||||
|
|
@ -1156,12 +1152,14 @@ void LLViewerObjectList::fetchPhysicsFlags()
|
|||
mPendingPhysicsFlags.insert(*iter);
|
||||
id_list[object_index++] = *iter;
|
||||
}
|
||||
}
|
||||
|
||||
// id_list should now contain all
|
||||
// requests in mStalePhysicsFlags before, so clear
|
||||
// it now
|
||||
mStalePhysicsFlags.clear();
|
||||
mStalePhysicsFlags.erase(iter++);
|
||||
|
||||
if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( id_list.size() > 0 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue