mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Always inform clients why the server chose to disconnect them, i.e. stop using NDR_UNKNOWN as a disconnect reason when the reason is known and add a LOGWARNING for future authors.
Differential Revision: https://code.wildfiregames.com/D1561 Tested on: clang 8.0.1, Jenkins This was SVN commit r22996.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -58,7 +58,7 @@ void CNetServerTurnManager::NotifyFinishedClientCommands(CNetServerSession& sess
|
||||
turn,
|
||||
m_ClientsReady[client] + 1);
|
||||
|
||||
session.Disconnect(NDR_UNKNOWN);
|
||||
session.Disconnect(NDR_INCORRECT_READY_TURN_COMMANDS);
|
||||
}
|
||||
|
||||
m_ClientsReady[client] = turn;
|
||||
@@ -106,7 +106,7 @@ void CNetServerTurnManager::NotifyFinishedClientUpdate(CNetServerSession& sessio
|
||||
turn,
|
||||
m_ClientsReady[client] + 1);
|
||||
|
||||
session.Disconnect(NDR_UNKNOWN);
|
||||
session.Disconnect(NDR_INCORRECT_READY_TURN_SIMULATED);
|
||||
}
|
||||
|
||||
m_ClientsSimulated[client] = turn;
|
||||
|
||||
Reference in New Issue
Block a user