change the return list of objects costs, sending a answer if none found

LSLKeyTest
UbitUmarov 2015-12-20 11:43:27 +00:00
parent b31adde5fc
commit 844266c4d5
1 changed files with 30 additions and 38 deletions

View File

@ -1442,10 +1442,9 @@ namespace OpenSim.Region.ClientStack.Linden
UUID uuid = object_ids[i].AsUUID();
SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid);
SceneObjectGroup grp = null;
if (part != null)
{
SceneObjectGroup grp = part.ParentGroup;
grp = part.ParentGroup;
if (grp != null)
{
float linksetCost;
@ -1460,23 +1459,19 @@ namespace OpenSim.Region.ClientStack.Linden
object_data["resource_cost"] = partCost;
object_data["physics_cost"] = partPhysCost;
object_data["linked_set_physics_cost"] = linksetPhysCost;
object_data["resource_limiting_type"] = "legacy";
resp[uuid.ToString()] = object_data;
}
else
}
if(resp.Count == 0)
{
OSDMap object_data = new OSDMap();
object_data["linked_set_resource_cost"] = 0;
object_data["resource_cost"] = 0;
object_data["physics_cost"] = 0;
object_data["linked_set_physics_cost"] = 0;
resp[uuid.ToString()] = object_data;
resp[UUID.Zero.ToString()] = object_data;
}
}
}
string response = OSDParser.SerializeLLSDXmlString(resp);
return response;
}
@ -1538,8 +1533,6 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
// if (simul != 0)
{
OSDMap object_data = new OSDMap();
object_data["physics"] = phys;
@ -1547,8 +1540,7 @@ namespace OpenSim.Region.ClientStack.Linden
object_data["simulation"] = simul;
resp["selected"] = object_data;
}
// resp["transaction_id"] = "undef";
string response = OSDParser.SerializeLLSDXmlString(resp);
return response;
}