Skip to content

Commit

Permalink
Fix player count (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
abnerfs authored Jan 15, 2024
1 parent f5641c8 commit af92b17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RockTheVote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace cs2_rockthevote
public class RockTheVote : BasePlugin, IPluginConfig<Config>
{
public override string ModuleName => "RockTheVote";
public override string ModuleVersion => "0.0.4";
public override string ModuleVersion => "0.0.5";
public override string ModuleAuthor => "abnerfs";
public override string ModuleDescription => "You know what it is, rtv";

Expand Down
4 changes: 1 addition & 3 deletions ServerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ public class ServerManager
public int ValidPlayerCount
{
get => Utilities.GetPlayers()
.Where(x => x.IsValid && !x.IsBot && !x.IsHLTV)
.Select(x => x.SteamID)
.Distinct()
.Where(x => x.IsValid && !x.IsBot && !x.IsHLTV && x.AuthorizedSteamID is not null && x.Connected == CounterStrikeSharp.API.Core.PlayerConnectedState.PlayerConnected)
.Count();
}
}
Expand Down

0 comments on commit af92b17

Please sign in to comment.