Skip to content

Commit

Permalink
fix: Timer unloaded onMapChange
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar-wos committed Jun 12, 2024
1 parent 43bc145 commit 4a922bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Zones.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class Zones : BasePlugin
public override void Load(bool isReload)
{
RegisterListener<Listeners.OnMapStart>(OnMapStart);
AddTimer(0.1f, Timer_Repeat, TimerFlags.REPEAT | TimerFlags.STOP_ON_MAPCHANGE);
AddTimer(0.1f, Timer_Repeat, TimerFlags.REPEAT);

if (!isReload)
return;
Expand Down Expand Up @@ -102,6 +102,6 @@ private void BouncePlayer(CCSPlayerController controller, QAngle eyes)

private static bool IsValidPlayer(CCSPlayerController? player)
{
return player != null && player is { IsValid: true, PawnIsAlive: true, IsBot: false, IsHLTV: false };
return player != null && player is { IsValid: true, Connected: PlayerConnectedState.PlayerConnected, PawnIsAlive: true, IsBot: false, IsHLTV: false };
}
}

0 comments on commit 4a922bf

Please sign in to comment.