Esempio n. 1
0
File: CTF.cs Progetto: derhass/olmod
        public static void Score(Player player)
        {
            if (NetworkMatch.m_postgame)
            {
                return;
            }
            if (!PlayerHasFlag.TryGetValue(player.netId, out int flag) || FlagStates[MPTeams.TeamNum(player.m_mp_team)] != FlagState.HOME)
            {
                return;
            }
            PlayerHasFlag.Remove(player.netId);

            if (!SendCTFLose(-1, player.netId, flag, FlagState.HOME, true))
            {
                return;
            }

            if (!CTF.CarrierBoostEnabled)
            {
                player.c_player_ship.m_boost_overheat_timer = 0;
                player.c_player_ship.m_boost_heat           = 0;
            }

            NetworkMatch.AddPointForTeam(player.m_mp_team);

            NotifyAll(CTFEvent.SCORE, string.Format(Loc.LS("{0} ({1}) CAPTURES THE {2} FLAG!"), player.m_mp_name, MPTeams.TeamName(player.m_mp_team),
                                                    MPTeams.TeamName(MPTeams.AllTeams[flag])), player, flag);
        }
Esempio n. 2
0
 public static void MaybeAddPointForTeam(MpTeam team)
 {
     if (NetworkMatch.GetMode() != MatchMode.MONSTERBALL && NetworkMatch.GetMode() != CTF.MatchModeCTF)
     {
         NetworkMatch.AddPointForTeam(team);
     }
 }
Esempio n. 3
0
File: CTF.cs Progetto: rucker/olmod
        public static void Score(Player player)
        {
            if (NetworkMatch.m_postgame)
            {
                return;
            }
            if (!PlayerHasFlag.TryGetValue(player.netId, out int flag) || FlagStates[MPTeams.TeamNum(player.m_mp_team)] != FlagState.HOME)
            {
                return;
            }
            PlayerHasFlag.Remove(player.netId);
            SendCTFLose(-1, player.netId, flag, FlagState.HOME);
            SpawnAtHome(flag);
            NetworkMatch.AddPointForTeam(player.m_mp_team);

            NotifyAll(CTFEvent.SCORE, string.Format(Loc.LS("{0} ({1}) CAPTURES THE {2} FLAG!"), player.m_mp_name, MPTeams.TeamName(player.m_mp_team),
                                                    MPTeams.TeamName(MPTeams.AllTeams[flag])), player, flag);
        }