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

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

                if (msg.m_flag_state == FlagState.LOST)
                {
                    CTF.FlagReturnTime[msg.m_flag_id] = Time.time + CTF.ReturnTimeAmount;
                }
            }

            if (!CTF.CarrierBoostEnabled && GameManager.m_player_ship.netId == msg.m_player_id)
            {
                GameManager.m_player_ship.m_boost_overheat_timer = 0;
                GameManager.m_player_ship.m_boost_heat           = 0;
            }

            // remove flag ring effect from carrier ship
            CTF.PlayerDisableRing(CTF.FindPlayerForEffect(msg.m_player_id));
        }
Пример #2
0
        private static void OnCTFLose(NetworkMessage rawMsg)
        {
            var msg = rawMsg.ReadMessage <PlayerFlagMessage>();

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

            // remove flag ring effect from carrier ship
            CTF.PlayerDisableRing(CTF.FindPlayerForEffect(msg.m_player_id));

            if (msg.m_flag_state == FlagState.LOST)
            {
                CTF.FlagReturnTime[msg.m_flag_id] = Time.time + CTF.ReturnTimeAmount;
            }
        }