Merge pull request #110 from RaidMax/enhancement/issue-108-address-t6-specific-behaviors
fix disconnect event being cancelled
This commit is contained in:
commit
239ca30fd1
@ -94,18 +94,18 @@ namespace IW4MAdmin
|
|||||||
if (client.ClientNumber >= 0)
|
if (client.ClientNumber >= 0)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
Logger.WriteInfo($"Client {client} [{client.State.ToString().ToLower()}] disconnecting...");
|
Logger.WriteInfo($"Client {client} [{client.State.ToString().ToLower()}] disconnecting...");
|
||||||
Clients[client.ClientNumber] = null;
|
Clients[client.ClientNumber] = null;
|
||||||
await client.OnDisconnect();
|
await client.OnDisconnect();
|
||||||
|
|
||||||
var e = new GameEvent()
|
var e = new GameEvent()
|
||||||
{
|
{
|
||||||
Origin = client,
|
Origin = client,
|
||||||
Owner = this,
|
Owner = this,
|
||||||
Type = GameEvent.EventType.Disconnect
|
Type = GameEvent.EventType.Disconnect
|
||||||
};
|
};
|
||||||
|
|
||||||
Manager.GetEventHandler().AddEvent(e);
|
Manager.GetEventHandler().AddEvent(e);
|
||||||
#if DEBUG == true
|
#if DEBUG == true
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -728,11 +728,6 @@ namespace IW4MAdmin
|
|||||||
|
|
||||||
foreach (var disconnectingClient in polledClients[1])
|
foreach (var disconnectingClient in polledClients[1])
|
||||||
{
|
{
|
||||||
if (disconnectingClient.State == ClientState.Disconnecting)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var e = new GameEvent()
|
var e = new GameEvent()
|
||||||
{
|
{
|
||||||
Type = GameEvent.EventType.PreDisconnect,
|
Type = GameEvent.EventType.PreDisconnect,
|
||||||
|
Loading…
Reference in New Issue
Block a user