summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r--indra/newview/llviewerobjectlist.cpp54
1 files changed, 25 insertions, 29 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index bfbb701a8e..9e1d86faac 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -68,7 +68,6 @@
#include "u64.h"
#include "llviewertexturelist.h"
#include "lldatapacker.h"
-#include "llcallstack.h"
#ifdef LL_USESYSTEMLIBS
#include <zlib.h>
#else
@@ -245,7 +244,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// ignore returned flags
LL_DEBUGS("ObjectUpdate") << "uuid " << objectp->mID << " calling processUpdateMessage "
<< objectp << " just_created " << just_created << " from_cache " << from_cache << " msg " << msg << LL_ENDL;
- dumpStack("ObjectUpdateStack");
objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
@@ -362,7 +360,6 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID());
LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " created objectp " << objectp << LL_ENDL;
- dumpStack("ObjectUpdateStack");
if (!objectp)
{
@@ -557,7 +554,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " objectp " << objectp
<< " update_cache " << (S32) update_cache << " compressed " << compressed
<< " update_type " << update_type << LL_ENDL;
- dumpStack("ObjectUpdateStack");
if(update_cache)
{
@@ -635,7 +631,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
LL_DEBUGS("ObjectUpdate") << "creating object " << fullid << " result " << objectp << LL_ENDL;
- dumpStack("ObjectUpdateStack");
if (!objectp)
{
@@ -729,7 +724,6 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
LL_DEBUGS("ObjectUpdate") << "got probe for id " << id << " crc " << crc << LL_ENDL;
- dumpStack("ObjectUpdateStack");
// Lookup data packer and add this id to cache miss lists if necessary.
U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
@@ -889,6 +883,7 @@ void LLViewerObjectList::update(LLAgent &agent)
static std::vector<LLViewerObject*> idle_list;
U32 idle_count = 0;
+ mNumAvatars = 0;
{
for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
@@ -906,6 +901,10 @@ void LLViewerObjectList::update(LLAgent &agent)
idle_list[idle_count] = objectp;
}
++idle_count;
+ if (objectp->isAvatar())
+ {
+ mNumAvatars++;
+ }
}
else
{ // There shouldn't be any NULL pointers in the list, but they have caused
@@ -1127,10 +1126,10 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
{
LLSD objectData = result[it->asString()];
- F32 linkCost = objectData["linked_set_resource_cost"].asReal();
- F32 objectCost = objectData["resource_cost"].asReal();
- F32 physicsCost = objectData["physics_cost"].asReal();
- F32 linkPhysicsCost = objectData["linked_set_physics_cost"].asReal();
+ F32 linkCost = (F32)objectData["linked_set_resource_cost"].asReal();
+ F32 objectCost = (F32)objectData["resource_cost"].asReal();
+ F32 physicsCost = (F32)objectData["physics_cost"].asReal();
+ F32 linkPhysicsCost = (F32)objectData["linked_set_physics_cost"].asReal();
gObjectList.updateObjectCost(objectId, objectCost, linkCost, physicsCost, linkPhysicsCost);
}
@@ -1255,10 +1254,10 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url)
if (data.has("Density"))
{
- F32 density = data["Density"].asReal();
- F32 friction = data["Friction"].asReal();
- F32 restitution = data["Restitution"].asReal();
- F32 gravityMult = data["GravityMultiplier"].asReal();
+ F32 density = (F32)data["Density"].asReal();
+ F32 friction = (F32)data["Friction"].asReal();
+ F32 restitution = (F32)data["Restitution"].asReal();
+ F32 gravityMult = (F32)data["GravityMultiplier"].asReal();
gObjectList.updatePhysicsProperties(objectId, density,
friction, restitution, gravityMult);
@@ -1300,7 +1299,6 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
// Remove from object map so noone can look it up.
LL_DEBUGS("ObjectUpdate") << " dereferencing id " << objectp->mID << LL_ENDL;
- dumpStack("ObjectUpdateStack");
mUUIDObjectMap.erase(objectp->mID);
@@ -1715,15 +1713,15 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
- LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
- LLColor4 below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
- LLColor4 you_own_above_water_color =
+ static const LLUIColor above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
+ static const LLUIColor below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
+ static const LLUIColor you_own_above_water_color =
LLUIColorTable::instance().getColor( "NetMapYouOwnAboveWater" );
- LLColor4 you_own_below_water_color =
+ static const LLUIColor you_own_below_water_color =
LLUIColorTable::instance().getColor( "NetMapYouOwnBelowWater" );
- LLColor4 group_own_above_water_color =
+ static const LLUIColor group_own_above_water_color =
LLUIColorTable::instance().getColor( "NetMapGroupOwnAboveWater" );
- LLColor4 group_own_below_water_color =
+ static const LLUIColor group_own_below_water_color =
LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" );
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
@@ -1753,7 +1751,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
// See DEV-17370 and DEV-29869/SNOW-79 for details.
approx_radius = llmin(approx_radius, max_radius);
- LLColor4U color = above_water_color;
+ LLColor4U color = above_water_color.get();
if( objectp->permYouOwner() )
{
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
@@ -1766,29 +1764,29 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
if ( objectp->permGroupOwner() )
{
- color = group_own_above_water_color;
+ color = group_own_above_water_color.get();
}
else
{
- color = you_own_above_water_color;
+ color = you_own_above_water_color.get();
}
}
else
{
if ( objectp->permGroupOwner() )
{
- color = group_own_below_water_color;
+ color = group_own_below_water_color.get();
}
else
{
- color = you_own_below_water_color;
+ color = you_own_below_water_color.get();
}
}
}
else
if( pos.mdV[VZ] < water_height )
{
- color = below_water_color;
+ color = below_water_color.get();
}
netmap.renderScaledPointGlobal(
@@ -1852,7 +1850,6 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
llassert_always(uuid.notNull());
LL_DEBUGS("ObjectUpdate") << "creating " << uuid << " local_id " << local_id << LL_ENDL;
- dumpStack("ObjectUpdateStack");
LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp);
if (!objectp)
@@ -1888,7 +1885,6 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
}
LL_DEBUGS("ObjectUpdate") << "createObject creating " << fullid << LL_ENDL;
- dumpStack("ObjectUpdateStack");
LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
if (!objectp)