send selected objects Proprieties udp part outside update queues and as a physics single caps message per selection request
parent
90fc4183dc
commit
d5f376a4b1
|
@ -1382,6 +1382,8 @@ namespace OpenSim.Framework
|
|||
|
||||
void SendObjectPropertiesReply(ISceneEntity Entity);
|
||||
|
||||
void SendSelectedPartsProprieties(List<ISceneEntity> parts);
|
||||
|
||||
void SendPartPhysicsProprieties(ISceneEntity Entity);
|
||||
|
||||
void SendAgentOffline(UUID[] agentIDs);
|
||||
|
|
|
@ -2801,6 +2801,48 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
SendAgentGroupDataUpdate(AgentId,GroupMembership);
|
||||
}
|
||||
|
||||
public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
|
||||
{
|
||||
// udp part
|
||||
ObjectPropertiesPacket packet =
|
||||
(ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
|
||||
ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count];
|
||||
|
||||
int i = 0;
|
||||
foreach(SceneObjectPart sop in parts)
|
||||
ObjectData[i++] = CreateObjectPropertiesBlock(sop);
|
||||
|
||||
packet.ObjectData = ObjectData;
|
||||
packet.Header.Zerocoded = true;
|
||||
// udp send splits this mega packets correctly
|
||||
// mb later will avoid that to reduce gc stress
|
||||
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||
|
||||
// caps physics part
|
||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||
if(eq == null)
|
||||
return;
|
||||
|
||||
OSDArray array = new OSDArray();
|
||||
foreach(SceneObjectPart sop in parts)
|
||||
{
|
||||
OSDMap physinfo = new OSDMap(6);
|
||||
physinfo["LocalID"] = sop.LocalId;
|
||||
physinfo["Density"] = sop.Density;
|
||||
physinfo["Friction"] = sop.Friction;
|
||||
physinfo["GravityMultiplier"] = sop.GravityModifier;
|
||||
physinfo["Restitution"] = sop.Restitution;
|
||||
physinfo["PhysicsShapeType"] = (int)sop.PhysicsShapeType;
|
||||
array.Add(physinfo);
|
||||
}
|
||||
|
||||
OSDMap llsdBody = new OSDMap(1);
|
||||
llsdBody.Add("ObjectData", array);
|
||||
|
||||
eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId);
|
||||
}
|
||||
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
SceneObjectPart part = (SceneObjectPart)entity;
|
||||
|
|
|
@ -166,7 +166,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="remoteClient"></param>
|
||||
public void SelectPrim(List<uint> primIDs, IClientAPI remoteClient)
|
||||
{
|
||||
List<SceneObjectPart> needUpdates = new List<SceneObjectPart>();
|
||||
List<ISceneEntity> needUpdates = new List<ISceneEntity>();
|
||||
|
||||
foreach(uint primLocalID in primIDs)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (sog == null)
|
||||
continue;
|
||||
|
||||
needUpdates.Add(part);
|
||||
needUpdates.Add((ISceneEntity)part);
|
||||
|
||||
// waste of time because properties do not send prim flags as they should
|
||||
// if a friend got or lost edit rights after login, a full update is needed
|
||||
|
@ -196,15 +196,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
if(needUpdates.Count > 0)
|
||||
{
|
||||
// this will be replaced by single client function
|
||||
// that will send the UDP and Caps part
|
||||
foreach(SceneObjectPart part in needUpdates)
|
||||
{
|
||||
part.SendPropertiesToClient(remoteClient);
|
||||
remoteClient.SendPartPhysicsProprieties(part);
|
||||
}
|
||||
}
|
||||
remoteClient.SendSelectedPartsProprieties(needUpdates);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1753,6 +1753,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
{
|
||||
}
|
||||
|
||||
public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1337,6 +1337,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
{
|
||||
}
|
||||
|
||||
public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1384,6 +1384,10 @@ namespace OpenSim.Tests.Common
|
|||
{
|
||||
}
|
||||
|
||||
public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue