NetworkServer.OnDisconnected: remove "Player not destroyed when connection disconnected." warning. This warning would be shown if a NetworkManager's OnServerDisconnect function wouldn't remove the player immediately, which is completely normal in most online games where the server delays a disconnect if the player was recently in combat - which would then show this warning every single time. OnServerDisconnect removes the player controller anyway, so there is no need for this warning at all.

This commit is contained in:
vis2k 2019-04-02 12:11:24 +02:00
parent c58cf884d4
commit 9c8211e573

View File

@ -399,13 +399,6 @@ static void OnDisconnected(int connectionId)
static void OnDisconnected(NetworkConnection conn) static void OnDisconnected(NetworkConnection conn)
{ {
conn.InvokeHandler(new DisconnectMessage()); conn.InvokeHandler(new DisconnectMessage());
if (conn.playerController != null)
{
//NOTE: should there be default behaviour here to destroy the associated player?
Debug.LogWarning("Player not destroyed when connection disconnected.");
}
if (LogFilter.Debug) Debug.Log("Server lost client:" + conn.connectionId); if (LogFilter.Debug) Debug.Log("Server lost client:" + conn.connectionId);
} }