* Stop the sim stats reporter reusing the same SimStatsPacket for all clients

* I believe this was the cause of the remaining packet_out_of_order messages in the Linden client logs
* There were race conditions where multiple clientstacks would overwrite each other's sequence numbers
This commit is contained in:
Justin Clarke Casey
2008-10-06 19:52:54 +00:00
parent a1f3409032
commit cb7a9eaa09
8 changed files with 154 additions and 54 deletions

View File

@@ -2610,9 +2610,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(PacketPool.Instance.GetPacket(PacketType.DisableSimulator), ThrottleOutPacketType.Unknown);
}
public void SendSimStats(Packet pack)
public void SendSimStats(SimStats stats)
{
SimStatsPacket pack = new SimStatsPacket();
pack.Region.RegionX = stats.RegionX;
pack.Region.RegionY = stats.RegionY;
pack.Region.RegionFlags = stats.RegionFlags;
pack.Region.ObjectCapacity = stats.ObjectCapacity;
pack.Region = stats.RegionBlock;
pack.Stat = stats.StatsBlock;
pack.Header.Reliable = false;
OutPacket(pack, ThrottleOutPacketType.Task);
}