Beispiel #1
0
        public static int addCarbonPlayer(string name)
        {
            NetworkPlayer networkPlayer = Network.NetworkClientAllocator.Allocate();

            networkPlayer.isCarbonPlayer = true;
            carbonList.Add(networkPlayer.id);
            carbonLink.Add(networkPlayer.id, new CarbonPlayer(networkPlayer));
            carbonNameLink.Add(networkPlayer.id, name);
            ClientSteamAuthSettings auth = new ClientSteamAuthSettings
            {
                SteamID           = 0UL,
                SteamCBAuthTicket = 0,
                SteamPAuthTicket  = new byte[0],
                MachineID         = SystemInfo.deviceUniqueIdentifier,
                MachineSecurityID = StringCipher.Hash(SystemInfo.deviceUniqueIdentifier, 0UL)
            };

            instant.serverGameManager.HandleSteamAuthSettings(auth, networkPlayer);
            return(networkPlayer.id);
        }