NetworkManager.RegisterServerMessages for AddPlayerMessage uses OnServerAddPlayer directly instead of wrapping it with a OnServerAddPlayerMessageInternal function

This commit is contained in:
vis2k 2019-03-22 09:46:14 +01:00
parent fa4efa6683
commit a39954003a

View File

@ -205,7 +205,7 @@ internal void RegisterServerMessages()
NetworkServer.RegisterHandler<ConnectMessage>(OnServerConnectInternal); NetworkServer.RegisterHandler<ConnectMessage>(OnServerConnectInternal);
NetworkServer.RegisterHandler<DisconnectMessage>(OnServerDisconnectInternal); NetworkServer.RegisterHandler<DisconnectMessage>(OnServerDisconnectInternal);
NetworkServer.RegisterHandler<ReadyMessage>(OnServerReadyMessageInternal); NetworkServer.RegisterHandler<ReadyMessage>(OnServerReadyMessageInternal);
NetworkServer.RegisterHandler<AddPlayerMessage>(OnServerAddPlayerMessageInternal); NetworkServer.RegisterHandler<AddPlayerMessage>(OnServerAddPlayer);
NetworkServer.RegisterHandler<RemovePlayerMessage>(OnServerRemovePlayerMessageInternal); NetworkServer.RegisterHandler<RemovePlayerMessage>(OnServerRemovePlayerMessageInternal);
NetworkServer.RegisterHandler<ErrorMessage>(OnServerErrorInternal); NetworkServer.RegisterHandler<ErrorMessage>(OnServerErrorInternal);
} }
@ -554,13 +554,6 @@ internal void OnServerReadyMessageInternal(NetworkConnection conn, ReadyMessage
OnServerReady(conn); OnServerReady(conn);
} }
internal void OnServerAddPlayerMessageInternal(NetworkConnection conn, AddPlayerMessage msg)
{
if (LogFilter.Debug) Debug.Log("NetworkManager.OnServerAddPlayerMessageInternal");
OnServerAddPlayer(conn, msg);
}
internal void OnServerRemovePlayerMessageInternal(NetworkConnection conn, RemovePlayerMessage msg) internal void OnServerRemovePlayerMessageInternal(NetworkConnection conn, RemovePlayerMessage msg)
{ {
if (LogFilter.Debug) Debug.Log("NetworkManager.OnServerRemovePlayerMessageInternal"); if (LogFilter.Debug) Debug.Log("NetworkManager.OnServerRemovePlayerMessageInternal");