From d81d2d896e004c02c523dbc5b68212126660eb92 Mon Sep 17 00:00:00 2001 From: audiomaster99 <116572799+audiomaster99@users.noreply.github.com> Date: Sat, 27 Apr 2024 03:58:14 +0200 Subject: [PATCH] add bots to player counter update to latest css [.NET8] --- BombsiteAnnouncer.cs | 5 +---- BombsiteAnnouncer.csproj | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/BombsiteAnnouncer.cs b/BombsiteAnnouncer.cs index a578249..40014ba 100644 --- a/BombsiteAnnouncer.cs +++ b/BombsiteAnnouncer.cs @@ -75,7 +75,6 @@ private void OnTick(CCSPlayerController player) ctNum = GetCurrentNumPlayers(CsTeam.CounterTerrorist); ttNum = GetCurrentNumPlayers(CsTeam.Terrorist); - // determine site image if (player.Team == CsTeam.CounterTerrorist) { color = "green"; @@ -86,8 +85,6 @@ private void OnTick(CCSPlayerController player) color = "red"; message = Localizer["phrases.defend"]; } - ctNum = GetCurrentNumPlayers(CsTeam.CounterTerrorist); - ttNum = GetCurrentNumPlayers(CsTeam.Terrorist); HandleCustomizedMessage(); player.PrintToCenterHtml(siteTextString + siteImageString + playerCounterString); } @@ -186,7 +183,7 @@ static bool IsAlive(CCSPlayerController player) } public static int GetCurrentNumPlayers(CsTeam? csTeam = null) { - return Utilities.GetPlayers().Count(player => IsAlive(player) && IsValid(player) && IsConnected(player) && (csTeam == null || player.Team == csTeam)); + return Utilities.GetPlayers().Count(player => IsAlive(player) && IsConnected(player) && (csTeam == null || player.Team == csTeam)); } public void IsRetakesPluginInstalled() { diff --git a/BombsiteAnnouncer.csproj b/BombsiteAnnouncer.csproj index 41423a1..68d8cc1 100644 --- a/BombsiteAnnouncer.csproj +++ b/BombsiteAnnouncer.csproj @@ -6,12 +6,12 @@ ./bin/BombsiteAnnouncer/ - net7.0 + net8.0 enable enable - + none runtime compile; build; native; contentfiles; analyzers; buildtransitive @@ -19,5 +19,5 @@ - +