Exemplo n.º 1
0
        public override void OnConnectionReady(NetConnection client)
        {
            // Allocate the player to a team
            AddPlayerToTeam(client, NetPlayerComponent.GetPlayer(client));

            // Get client up to date
            NetChannel.FireEvent("Client_GamemodeInfo", client, (ushort)SCORE_CAP);
            NetChannel.FireEvent("Client_UpdateScores", client, RemoteFlag.None,
                                 NetDeliveryMethod.ReliableOrdered, (short)teamAScore, (short)teamBScore);

            // Spawn their player
            AddRespawn(client, 0);
        }
Exemplo n.º 2
0
        public override void OnConnectionReady(NetConnection client)
        {
            // Allocate the player to a team
            AddPlayerToTeam(client, NetPlayerComponent.GetPlayer(client));

            // Get client up to date
            NetChannel.FireEvent("Client_GamemodeInfo", client, (ushort)SCORE_CAP);
            NetChannel.FireEvent("Client_UpdateScores", client, RemoteFlag.None,
                                 NetDeliveryMethod.ReliableOrdered, (short)teamAScore, (short)teamBScore);
            if (redIntel.Holder != null)
            {
                NetChannel.FireEvent("Client_IntelPickedUp", client,
                                     (byte)Team.A, ((ServerMPPlayer)redIntel.Holder).StateInfo.Id);
            }
            if (blueIntel.Holder != null)
            {
                NetChannel.FireEvent("Client_IntelPickedUp", client,
                                     (byte)Team.B, ((ServerMPPlayer)blueIntel.Holder).StateInfo.Id);
            }

            // Spawn their player
            AddRespawn(client, 0);
        }