Listen only for non SimShutdown Network.Disconnect firing so that we don't quite the program before all bots have actually logged off.
parent
53f3b76a84
commit
40750b44a0
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue