From 40750b44a09c9970497657c3a847af2d92c8b385 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 1 Nov 2011 21:47:14 +0000 Subject: Listen only for non SimShutdown Network.Disconnect firing so that we don't quite the program before all bots have actually logged off. --- OpenSim/Tools/pCampBot/PhysicsBot.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 945697b..5bcd35d 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -398,7 +398,13 @@ namespace pCampBot // (args.Reason == NetworkManager.DisconnectType.SimShutdown // || args.Reason == NetworkManager.DisconnectType.NetworkTimeout) // && OnDisconnected != null) - if (OnDisconnected != null) + + if ( + (args.Reason == NetworkManager.DisconnectType.ClientInitiated + || args.Reason == NetworkManager.DisconnectType.ServerInitiated + || args.Reason == NetworkManager.DisconnectType.NetworkTimeout) + && OnDisconnected != null) +// if (OnDisconnected != null) { OnDisconnected(this, EventType.DISCONNECTED); } -- cgit v1.1