From 1ba51dd2fdd658947cc94af2d788f0cc4da03a3f Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 10 May 2008 13:11:09 +0000 Subject: * 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') --- OpenSim/Region/Environment/Scenes/Scene.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1f66744..2e1116b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -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); } } -- cgit v1.1