diff options
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index bfbb701a8e..435bd60917 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -889,6 +889,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 +907,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 +1132,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 +1260,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); @@ -1715,15 +1720,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 +1758,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 +1771,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( |