Skip to content

Commit

Permalink
change logs valid check
Browse files Browse the repository at this point in the history
  • Loading branch information
destoer committed Feb 4, 2024
1 parent 895421c commit f783f47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/Warden/Logs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ private HookResult OnRoundEnd(EventRoundEnd @event, GameEventInfo info)
{
foreach (CCSPlayerController player in Utilities.GetPlayers())
{
if (!player.IsValid || player.IsBot || player.IsHLTV) continue;
printLogs(player);
if (player.is_valid() && !player.IsBot)
{
printLogs(player);
}
}
logs.Clear();
return HookResult.Continue;
Expand Down
5 changes: 0 additions & 5 deletions src/Warden/Warden.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ public void remove_warden()

public void remove_if_warden(CCSPlayerController? player)
{
if(!player.is_valid())
{
return;
}

if(is_warden(player))
{
remove_warden();
Expand Down

0 comments on commit f783f47

Please sign in to comment.