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); }
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); }