Changed the DeRezObject event so it passes a list<uint> of localIDs in one event trigger rather than triggering the event once for every localid in the derez packet.
parent
71ab7a1e2d
commit
d9a8ecf238
|
@ -99,7 +99,7 @@ namespace OpenSim.Framework
|
||||||
public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
|
public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
|
||||||
|
|
||||||
public delegate void DeRezObject(
|
public delegate void DeRezObject(
|
||||||
IClientAPI remoteClient, uint localID, UUID groupID, DeRezAction action, UUID destinationID);
|
IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID);
|
||||||
|
|
||||||
public delegate void GenericCall5(IClientAPI remoteClient, bool status);
|
public delegate void GenericCall5(IClientAPI remoteClient, bool status);
|
||||||
|
|
||||||
|
|
|
@ -5065,16 +5065,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerDeRezObject = OnDeRezObject;
|
handlerDeRezObject = OnDeRezObject;
|
||||||
if (handlerDeRezObject != null)
|
if (handlerDeRezObject != null)
|
||||||
{
|
{
|
||||||
|
List<uint> deRezIDs = new List<uint>();
|
||||||
|
|
||||||
foreach (DeRezObjectPacket.ObjectDataBlock data in
|
foreach (DeRezObjectPacket.ObjectDataBlock data in
|
||||||
DeRezPacket.ObjectData)
|
DeRezPacket.ObjectData)
|
||||||
{
|
{
|
||||||
|
deRezIDs.Add(data.ObjectLocalID);
|
||||||
|
}
|
||||||
// It just so happens that the values on the DeRezAction enumerator match the Destination
|
// It just so happens that the values on the DeRezAction enumerator match the Destination
|
||||||
// values given by a Second Life client
|
// values given by a Second Life client
|
||||||
handlerDeRezObject(this, data.ObjectLocalID,
|
handlerDeRezObject(this, deRezIDs,
|
||||||
DeRezPacket.AgentBlock.GroupID,
|
DeRezPacket.AgentBlock.GroupID,
|
||||||
(DeRezAction)DeRezPacket.AgentBlock.Destination,
|
(DeRezAction)DeRezPacket.AgentBlock.Destination,
|
||||||
DeRezPacket.AgentBlock.DestinationID);
|
DeRezPacket.AgentBlock.DestinationID);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1684,6 +1684,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when one or more objects are removed from the environment into inventory.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="localID"></param>
|
||||||
|
/// <param name="groupID"></param>
|
||||||
|
/// <param name="action"></param>
|
||||||
|
/// <param name="destinationID"></param>
|
||||||
|
public virtual void DeRezObject(IClientAPI remoteClient, List<uint> localIDs,
|
||||||
|
UUID groupID, DeRezAction action, UUID destinationID)
|
||||||
|
{
|
||||||
|
foreach (uint localID in localIDs)
|
||||||
|
{
|
||||||
|
DeRezObject(remoteClient, localID, groupID, action, destinationID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when an object is removed from the environment into inventory.
|
/// Called when an object is removed from the environment into inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue