Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 6c8229d

Browse files
committed
fix: Remove HLTV from queues(?)
1 parent fc95439 commit 6c8229d

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- 2024.04.11 - 1.3.3
2+
3+
- fix: Remove HLTV from queues(?)
4+
15
-- 2024.04.11 - 1.3.2
26

37
- fix: Challenge cmd, not in arena problem

src-plugin/Plugin/Plugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public override void Load(bool hotReload)
7777
gameRules = Utilities.FindAllEntitiesByDesignerName<CCSGameRulesProxy>("cs_gamerules").First().GameRules;
7878

7979
Utilities.GetPlayers()
80-
.Where(p => p.IsValid == true && p.PlayerPawn?.IsValid == true && p.Connected == PlayerConnectedState.PlayerConnected)
80+
.Where(p => p.IsValid == true && p.PlayerPawn?.IsValid == true && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected)
8181
.ToList()
8282
.ForEach(p =>
8383
{

src-plugin/Plugin/PluginEvents.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public void Initialize_Events()
5454
if (!playerController.IsValid)
5555
return HookResult.Continue;
5656

57+
if (playerController.IsHLTV)
58+
return HookResult.Continue;
59+
5760
SetupPlayer(playerController);
5861

5962
if (gameRules?.WarmupPeriod == false)
@@ -91,7 +94,7 @@ public void Initialize_Events()
9194
CheckCommonProblems();
9295

9396
Utilities.GetPlayers()
94-
.Where(x => x?.IsValid == true && x.PlayerPawn?.IsValid == true && x.Connected == PlayerConnectedState.PlayerConnected)
97+
.Where(x => x?.IsValid == true && x.PlayerPawn?.IsValid == true && !x.IsHLTV && x.Connected == PlayerConnectedState.PlayerConnected)
9598
.ToList()
9699
.ForEach(x =>
97100
{

src-plugin/Plugin/PluginManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed partial class Plugin : BasePlugin
1010

1111
public override string ModuleAuthor => "K4ryuu";
1212

13-
public override string ModuleVersion => "1.3.2 " +
13+
public override string ModuleVersion => "1.3.3 " +
1414
#if RELEASE
1515
"(release)";
1616
#else

src-plugin/Plugin/PluginStock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void TerminateRoundIfPossible(CsTeam? team = null)
2424
if (Arenas is null)
2525
return;
2626

27-
List<CCSPlayerController> players = Utilities.GetPlayers().Where(x => x?.IsValid == true && x.PlayerPawn?.IsValid == true && x.Connected == PlayerConnectedState.PlayerConnected).ToList();
27+
List<CCSPlayerController> players = Utilities.GetPlayers().Where(x => x?.IsValid == true && x.PlayerPawn?.IsValid == true && !x.IsHLTV && x.Connected == PlayerConnectedState.PlayerConnected).ToList();
2828

2929
if (players.Count(p => !p.IsBot) == 0)
3030
return;

0 commit comments

Comments
 (0)