* More OutPacket refactors.

* Added back a sleep to the kick routine so users get a 'you have been logged off message' when they get kicked from the simulator for various reasons (like 'the simulator is going down')
This commit is contained in:
Teravus Ovares
2008-05-10 13:11:09 +00:00
parent b67f88a3a2
commit 1ba51dd2fd
5 changed files with 29 additions and 157 deletions

View File

@@ -570,8 +570,7 @@ namespace OpenSim.Region.Environment.Scenes
if (!avatar.IsChildAgent)
avatar.ControllingClient.Kick("The simulator is going down.");
avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(PacketType.DisableSimulator),
ThrottleOutPacketType.Task);
avatar.ControllingClient.SendShutdownConnectionNotice();
});
// Wait here, or the kick messages won't actually get to the agents before the scene terminates.
@@ -790,8 +789,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if (!agent.IsChildAgent)
{
pack.Header.Reliable = false;
agent.ControllingClient.OutPacket(pack, ThrottleOutPacketType.Task);
agent.ControllingClient.SendSimStats(pack);
}
}
}
@@ -2140,8 +2138,8 @@ namespace OpenSim.Region.Environment.Scenes
m_innerScene.removeUserCount(true);
}
// Tell a single agent to disconnect from the region.
DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
presence.ControllingClient.OutPacket(disable, ThrottleOutPacketType.Unknown);
presence.ControllingClient.SendShutdownConnectionNotice();
presence.ControllingClient.Close(true);
}
}