Пример #1
0
        private static void OnCTFPickup(NetworkMessage rawMsg)
        {
            var msg = rawMsg.ReadMessage <PlayerFlagMessage>();

            CTF.FlagStates[msg.m_flag_id] = msg.m_flag_state;
            if (CTF.PlayerHasFlag.ContainsKey(msg.m_player_id))
            {
                return;
            }
            CTF.PlayerHasFlag.Add(msg.m_player_id, msg.m_flag_id);

            // copy flag ring effect to carrier ship
            CTF.PlayerEnableRing(CTF.FindPlayerForEffect(msg.m_player_id), msg.m_flag_id);
        }
Пример #2
0
        private static void OnCTFPickup(NetworkMessage rawMsg)
        {
            var msg = rawMsg.ReadMessage <PlayerFlagMessage>();

            if (!CTF.IsActiveServer)
            {
                CTF.FlagStates[msg.m_flag_id] = msg.m_flag_state;
                if (CTF.PlayerHasFlag.ContainsKey(msg.m_player_id))
                {
                    return;
                }
                CTF.PlayerHasFlag.Add(msg.m_player_id, msg.m_flag_id);
            }

            if (!CTF.CarrierBoostEnabled && GameManager.m_player_ship.netId == msg.m_player_id)
            {
                GameManager.m_player_ship.m_boosting             = false;
                GameManager.m_player_ship.m_boost_overheat_timer = float.MaxValue;
            }

            // copy flag ring effect to carrier ship
            CTF.PlayerEnableRing(CTF.FindPlayerForEffect(msg.m_player_id), msg.m_flag_id);
        }