RemovePlayerController() private method

private RemovePlayerController ( short playerControllerId ) : void
playerControllerId short
return void
        public static bool RemovePlayer(short playerControllerId)
        {
            if (LogFilter.logDebug)
            {
                Debug.Log("ClientScene::RemovePlayer() for ID " + playerControllerId + " called with connection [" + s_ReadyConnection + "]");
            }

            PlayerController playerController;

            if (s_ReadyConnection.GetPlayerController(playerControllerId, out playerController))
            {
                var msg = new RemovePlayerMessage();
                msg.playerControllerId = playerControllerId;
                s_ReadyConnection.Send(MsgType.RemovePlayer, msg);

                s_ReadyConnection.RemovePlayerController(playerControllerId);
                s_LocalPlayers[playerControllerId] = new PlayerController();

                Object.Destroy(playerController.gameObject);
                return(true);
            }
            if (LogFilter.logError)
            {
                Debug.LogError("Failed to find player ID " + playerControllerId);
            }
            return(false);
        }