Picked up a few small changes from viewer-beta pertaining to pathfinding.
This commit is contained in:
@@ -5460,9 +5460,12 @@ BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state)
|
|||||||
void LLViewerObject::setPhysicsShapeType(U8 type)
|
void LLViewerObject::setPhysicsShapeType(U8 type)
|
||||||
{
|
{
|
||||||
mPhysicsShapeUnknown = false;
|
mPhysicsShapeUnknown = false;
|
||||||
|
if (type != mPhysicsShapeType)
|
||||||
|
{
|
||||||
mPhysicsShapeType = type;
|
mPhysicsShapeType = type;
|
||||||
mCostStale = true;
|
mCostStale = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LLViewerObject::setPhysicsGravity(F32 gravity)
|
void LLViewerObject::setPhysicsGravity(F32 gravity)
|
||||||
{
|
{
|
||||||
@@ -5488,7 +5491,6 @@ U8 LLViewerObject::getPhysicsShapeType() const
|
|||||||
{
|
{
|
||||||
if (mPhysicsShapeUnknown)
|
if (mPhysicsShapeUnknown)
|
||||||
{
|
{
|
||||||
mPhysicsShapeUnknown = false;
|
|
||||||
gObjectList.updatePhysicsFlags(this);
|
gObjectList.updatePhysicsFlags(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ extern BOOL gAnimateTextures;
|
|||||||
#include "importtracker.h"
|
#include "importtracker.h"
|
||||||
extern ImportTracker gImportTracker;
|
extern ImportTracker gImportTracker;
|
||||||
|
|
||||||
|
#define MAX_CONCURRENT_PHYSICS_REQUESTS 256
|
||||||
|
|
||||||
void dialog_refresh_all();
|
void dialog_refresh_all();
|
||||||
|
|
||||||
#define CULL_VIS
|
#define CULL_VIS
|
||||||
@@ -1083,8 +1085,6 @@ void LLViewerObjectList::fetchObjectCosts()
|
|||||||
LLSD id_list;
|
LLSD id_list;
|
||||||
U32 object_index = 0;
|
U32 object_index = 0;
|
||||||
|
|
||||||
U32 count = 0;
|
|
||||||
|
|
||||||
for (
|
for (
|
||||||
std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
|
std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
|
||||||
iter != mStaleObjectCost.end();
|
iter != mStaleObjectCost.end();
|
||||||
@@ -1101,7 +1101,7 @@ void LLViewerObjectList::fetchObjectCosts()
|
|||||||
|
|
||||||
mStaleObjectCost.erase(iter++);
|
mStaleObjectCost.erase(iter++);
|
||||||
|
|
||||||
if (count++ >= 450)
|
if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1146,7 +1146,7 @@ void LLViewerObjectList::fetchPhysicsFlags()
|
|||||||
for (
|
for (
|
||||||
std::set<LLUUID>::iterator iter = mStalePhysicsFlags.begin();
|
std::set<LLUUID>::iterator iter = mStalePhysicsFlags.begin();
|
||||||
iter != mStalePhysicsFlags.end();
|
iter != mStalePhysicsFlags.end();
|
||||||
++iter)
|
)
|
||||||
{
|
{
|
||||||
// Check to see if a request for this object
|
// Check to see if a request for this object
|
||||||
// has already been made.
|
// has already been made.
|
||||||
@@ -1156,12 +1156,14 @@ void LLViewerObjectList::fetchPhysicsFlags()
|
|||||||
mPendingPhysicsFlags.insert(*iter);
|
mPendingPhysicsFlags.insert(*iter);
|
||||||
id_list[object_index++] = *iter;
|
id_list[object_index++] = *iter;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// id_list should now contain all
|
mStalePhysicsFlags.erase(iter++);
|
||||||
// requests in mStalePhysicsFlags before, so clear
|
|
||||||
// it now
|
if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS)
|
||||||
mStalePhysicsFlags.clear();
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( id_list.size() > 0 )
|
if ( id_list.size() > 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user