diff --git a/Mirror/Runtime/Messages.cs b/Mirror/Runtime/Messages.cs index fa9d7c2eb..3088659d4 100644 --- a/Mirror/Runtime/Messages.cs +++ b/Mirror/Runtime/Messages.cs @@ -140,7 +140,7 @@ public override void Serialize(NetworkWriter writer) } } - public class RemovePlayerMessage : MessageBase + public class RemovePlayerMessage : EmptyMessage { } diff --git a/Mirror/Runtime/NetworkManager.cs b/Mirror/Runtime/NetworkManager.cs index 68f7a5ad5..c051eacdf 100644 --- a/Mirror/Runtime/NetworkManager.cs +++ b/Mirror/Runtime/NetworkManager.cs @@ -588,8 +588,6 @@ internal void OnServerRemovePlayerMessageInternal(NetworkMessage netMsg) { if (LogFilter.Debug) { Debug.Log("NetworkManager:OnServerRemovePlayerMessageInternal"); } - RemovePlayerMessage msg = netMsg.ReadMessage(); - if (netMsg.conn.playerController != null) { OnServerRemovePlayer(netMsg.conn, netMsg.conn.playerController); diff --git a/Mirror/Runtime/NetworkServer.cs b/Mirror/Runtime/NetworkServer.cs index 7853104c4..bce4ea568 100644 --- a/Mirror/Runtime/NetworkServer.cs +++ b/Mirror/Runtime/NetworkServer.cs @@ -861,8 +861,6 @@ static void OnClientReadyMessage(NetworkMessage netMsg) // default remove player handler static void OnRemovePlayerMessage(NetworkMessage netMsg) { - RemovePlayerMessage msg = netMsg.ReadMessage(); - if (netMsg.conn.playerController != null) { netMsg.conn.RemovePlayerController();