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.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 08a1ba0f9b..cda8c99594 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -99,8 +99,6 @@ extern LLPipeline gPipeline;
// Statics for object lookup tables.
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
-std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
LLViewerObjectList::LLViewerObjectList()
{
@@ -138,17 +136,17 @@ void LLViewerObjectList::getUUIDFromLocal(LLUUID &id,
{
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
if (!index)
{
index = sSimulatorMachineIndex++;
- sIPAndPortToIndex[ipport] = index;
+ mIPAndPortToIndex[ipport] = index;
}
U64 indexid = (((U64)index) << 32) | (U64)local_id;
- id = get_if_there(sIndexAndLocalIDToUUID, indexid, LLUUID::null);
+ id = get_if_there(mIndexAndLocalIDToUUID, indexid, LLUUID::null);
}
U64 LLViewerObjectList::getIndex(const U32 local_id,
@@ -157,7 +155,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
{
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
if (!index)
{
@@ -177,14 +175,14 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
U32 ip = objectp->getRegion()->getHost().getAddress();
U32 port = objectp->getRegion()->getHost().getPort();
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
// LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
U64 indexid = (((U64)index) << 32) | (U64)local_id;
- std::map<U64, LLUUID>::iterator iter = sIndexAndLocalIDToUUID.find(indexid);
- if (iter == sIndexAndLocalIDToUUID.end())
+ std::map<U64, LLUUID>::iterator iter = mIndexAndLocalIDToUUID.find(indexid);
+ if (iter == mIndexAndLocalIDToUUID.end())
{
return false;
}
@@ -192,7 +190,7 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
// Found existing entry
if (iter->second == objectp->getID())
{ // Full UUIDs match, so remove the entry
- sIndexAndLocalIDToUUID.erase(iter);
+ mIndexAndLocalIDToUUID.erase(iter);
return true;
}
// UUIDs did not match - this would zap a valid entry, so don't erase it
@@ -210,17 +208,17 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,
{
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
if (!index)
{
index = sSimulatorMachineIndex++;
- sIPAndPortToIndex[ipport] = index;
+ mIPAndPortToIndex[ipport] = index;
}
U64 indexid = (((U64)index) << 32) | (U64)local_id;
- sIndexAndLocalIDToUUID[indexid] = id;
+ mIndexAndLocalIDToUUID[indexid] = id;
//LL_INFOS() << "Adding object to table, full ID " << id
// << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
@@ -1129,10 +1127,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);
}
@@ -1257,10 +1255,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);