mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Merge branch 'master' into varregion
This commit is contained in:
@@ -1435,6 +1435,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
mapReply.AgentData.AgentID = AgentId;
|
||||
mapReply.Data = new MapBlockReplyPacket.DataBlock[mapBlocks2.Length];
|
||||
mapReply.Size = new MapBlockReplyPacket.SizeBlock[mapBlocks2.Length];
|
||||
mapReply.AgentData.Flags = flag;
|
||||
|
||||
for (int i = 0; i < mapBlocks2.Length; i++)
|
||||
@@ -1449,6 +1450,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
mapReply.Data[i].RegionFlags = mapBlocks2[i].RegionFlags;
|
||||
mapReply.Data[i].Access = mapBlocks2[i].Access;
|
||||
mapReply.Data[i].Agents = mapBlocks2[i].Agents;
|
||||
|
||||
// TODO: hookup varregion sim size here
|
||||
mapReply.Size[i] = new MapBlockReplyPacket.SizeBlock();
|
||||
mapReply.Size[i].SizeX = 256;
|
||||
mapReply.Size[i].SizeY = 256;
|
||||
}
|
||||
OutPacket(mapReply, ThrottleOutPacketType.Land);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
stat => stat.Value = m_udpServer.IncomingOrphanedPacketCount,
|
||||
StatVerbosity.Info));
|
||||
|
||||
StatsManager.RegisterStat(
|
||||
new Stat(
|
||||
"IncomingPacketsResentCount",
|
||||
"Number of inbound packets that clients indicate are resends.",
|
||||
"",
|
||||
"",
|
||||
"clientstack",
|
||||
scene.Name,
|
||||
StatType.Pull,
|
||||
MeasuresOfInterest.AverageChangeOverTime,
|
||||
stat => stat.Value = m_udpServer.IncomingPacketsResentCount,
|
||||
StatVerbosity.Debug));
|
||||
|
||||
StatsManager.RegisterStat(
|
||||
new Stat(
|
||||
"OutgoingUDPSendsCount",
|
||||
@@ -317,6 +330,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
/// </summary>
|
||||
internal int PacketsSentCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Record how many incoming packets are indicated as resends by clients.
|
||||
/// </summary>
|
||||
internal int IncomingPacketsResentCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Record how many inbound packets could not be recognized as LLUDP packets.
|
||||
/// </summary>
|
||||
@@ -1467,6 +1485,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
#region Incoming Packet Accounting
|
||||
|
||||
// We're not going to worry about interlock yet since its not currently critical that this total count
|
||||
// is 100% correct
|
||||
if (packet.Header.Resent)
|
||||
IncomingPacketsResentCount++;
|
||||
|
||||
// Check the archive of received reliable packet IDs to see whether we already received this packet
|
||||
if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence))
|
||||
{
|
||||
|
||||
@@ -194,7 +194,8 @@ namespace OpenSim.Services.UserAccountService
|
||||
|
||||
public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
{
|
||||
m_log.DebugFormat("[GRID USER SERVICE]: SetLastPosition for {0}", userID);
|
||||
// m_log.DebugFormat("[GRID USER SERVICE]: SetLastPosition for {0}", userID);
|
||||
|
||||
GridUserData d = m_Database.Get(userID);
|
||||
if (d == null)
|
||||
{
|
||||
|
||||
@@ -264,9 +264,10 @@ namespace pCampBot
|
||||
newClient.Throttle.Total = 400000;
|
||||
}
|
||||
|
||||
newClient.Network.LoginProgress += this.Network_LoginProgress;
|
||||
newClient.Network.SimConnected += this.Network_SimConnected;
|
||||
newClient.Network.Disconnected += this.Network_OnDisconnected;
|
||||
newClient.Network.LoginProgress += Network_LoginProgress;
|
||||
newClient.Network.SimConnected += Network_SimConnected;
|
||||
newClient.Network.SimDisconnected += Network_SimDisconnected;
|
||||
newClient.Network.Disconnected += Network_OnDisconnected;
|
||||
newClient.Objects.ObjectUpdate += Objects_NewPrim;
|
||||
|
||||
Client = newClient;
|
||||
@@ -276,7 +277,7 @@ namespace pCampBot
|
||||
//add additional steps and/or things the bot should do
|
||||
private void Action()
|
||||
{
|
||||
while (ConnectionState != ConnectionState.Disconnecting)
|
||||
while (ConnectionState == ConnectionState.Connected)
|
||||
{
|
||||
lock (Behaviours)
|
||||
{
|
||||
@@ -583,7 +584,13 @@ namespace pCampBot
|
||||
public void Network_SimConnected(object sender, SimConnectedEventArgs args)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[BOT]: Bot {0} connected to {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
|
||||
"[BOT]: Bot {0} connected to region {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
|
||||
}
|
||||
|
||||
public void Network_SimDisconnected(object sender, SimDisconnectedEventArgs args)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[BOT]: Bot {0} disconnected from region {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
|
||||
}
|
||||
|
||||
public void Network_OnDisconnected(object sender, DisconnectedEventArgs args)
|
||||
@@ -591,7 +598,7 @@ namespace pCampBot
|
||||
ConnectionState = ConnectionState.Disconnected;
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[BOT]: Bot {0} disconnected reason {1}, message {2}", Name, args.Reason, args.Message);
|
||||
"[BOT]: Bot {0} disconnected from grid, reason {1}, message {2}", Name, args.Reason, args.Message);
|
||||
|
||||
// m_log.ErrorFormat("Fired Network_OnDisconnected");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user