diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2b1bd97..fff4300 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1516,35 +1516,46 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1516 | OutPacket(pc, ThrottleOutPacketType.Unknown); | 1516 | OutPacket(pc, ThrottleOutPacketType.Unknown); |
1517 | } | 1517 | } |
1518 | 1518 | ||
1519 | public void SendKillObject(ulong regionHandle, uint localID) | 1519 | public void SendKillObject(ulong regionHandle, List<uint> localIDs) |
1520 | { | 1520 | { |
1521 | // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); | 1521 | // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); |
1522 | 1522 | ||
1523 | KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); | 1523 | KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); |
1524 | // TODO: don't create new blocks if recycling an old packet | 1524 | // TODO: don't create new blocks if recycling an old packet |
1525 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; | 1525 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[localIDs.Count]; |
1526 | kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); | 1526 | for (int i = 0 ; i < localIDs.Count ; i++ ) |
1527 | kill.ObjectData[0].ID = localID; | 1527 | { |
1528 | kill.ObjectData[i] = new KillObjectPacket.ObjectDataBlock(); | ||
1529 | kill.ObjectData[i].ID = localIDs[i]; | ||
1530 | } | ||
1528 | kill.Header.Reliable = true; | 1531 | kill.Header.Reliable = true; |
1529 | kill.Header.Zerocoded = true; | 1532 | kill.Header.Zerocoded = true; |
1530 | 1533 | ||
1531 | if (m_scene.GetScenePresence(localID) == null) | 1534 | if (localIDs.Count == 1) |
1532 | { | 1535 | { |
1533 | lock (m_entityUpdates.SyncRoot) | 1536 | if (m_scene.GetScenePresence(localIDs[0]) != null) |
1534 | { | 1537 | { |
1535 | m_killRecord.Add(localID); | 1538 | OutPacket(kill, ThrottleOutPacketType.State); |
1536 | 1539 | return; | |
1537 | // The throttle queue used here must match that being used for updates. Otherwise, there is a | ||
1538 | // chance that a kill packet put on a separate queue will be sent to the client before an existing | ||
1539 | // update packet on another queue. Receiving updates after kills results in unowned and undeletable | ||
1540 | // scene objects in a viewer until that viewer is relogged in. | ||
1541 | OutPacket(kill, ThrottleOutPacketType.Task); | ||
1542 | } | 1540 | } |
1541 | m_killRecord.Add(localIDs[0]); | ||
1543 | } | 1542 | } |
1544 | else | 1543 | else |
1545 | { | 1544 | { |
1546 | OutPacket(kill, ThrottleOutPacketType.State); | 1545 | lock (m_entityUpdates.SyncRoot) |
1546 | { | ||
1547 | foreach (uint localID in localIDs) | ||
1548 | m_killRecord.Add(localID); | ||
1549 | } | ||
1547 | } | 1550 | } |
1551 | |||
1552 | // The throttle queue used here must match that being used for | ||
1553 | // updates. Otherwise, there is a chance that a kill packet put | ||
1554 | // on a separate queue will be sent to the client before an | ||
1555 | // existing update packet on another queue. Receiving updates | ||
1556 | // after kills results in unowned and undeletable | ||
1557 | // scene objects in a viewer until that viewer is relogged in. | ||
1558 | OutPacket(kill, ThrottleOutPacketType.Task); | ||
1548 | } | 1559 | } |
1549 | 1560 | ||
1550 | /// <summary> | 1561 | /// <summary> |
@@ -10969,7 +10980,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10969 | { | 10980 | { |
10970 | // It's a ghost! tell the client to delete it from view. | 10981 | // It's a ghost! tell the client to delete it from view. |
10971 | simClient.SendKillObject(Scene.RegionInfo.RegionHandle, | 10982 | simClient.SendKillObject(Scene.RegionInfo.RegionHandle, |
10972 | localId); | 10983 | new List<uint>() { localId }); |
10973 | } | 10984 | } |
10974 | else | 10985 | else |
10975 | { | 10986 | { |