Skip to content

Commit

Permalink
Fix warden breaking after guaranteed warden rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Sep 20, 2024
1 parent f0e5824 commit 889868f
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions mod/Jailbreak.LastRequest/LastRequestFactory.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API.Core;
using Jailbreak.Formatting.Views.LastRequest;
using Jailbreak.LastRequest.LastRequests;
Expand Down
6 changes: 5 additions & 1 deletion mod/Jailbreak.LastRequest/LastRequestManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using CounterStrikeSharp.API;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes.Registration;
using CounterStrikeSharp.API.Modules.Cvars;
Expand Down
1 change: 1 addition & 0 deletions mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Menu;
Expand Down
1 change: 1 addition & 0 deletions mod/Jailbreak.LastRequest/LastRequests/Coinflip.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Menu;
using Jailbreak.Formatting.Extensions;
Expand Down
1 change: 1 addition & 0 deletions mod/Jailbreak.LastRequest/LastRequests/KnifeFight.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API.Core;
using Jailbreak.Public.Mod.LastRequest.Enums;

Expand Down
1 change: 1 addition & 0 deletions mod/Jailbreak.LastRequest/LastRequests/NoScope.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Timers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Menu;
using CounterStrikeSharp.API.Modules.Timers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using CounterStrikeSharp.API.Core;
using Jailbreak.Formatting.Extensions;
using Jailbreak.Formatting.Views.LastRequest;
Expand Down
3 changes: 1 addition & 2 deletions mod/Jailbreak.Warden/Selection/WardenSelectionBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void ScheduleChooseWarden(float time = 7.0f) {
/// </summary>
protected void OnChooseWarden() {
guaranteedWarden.Clear();
queueInactive = true;
if (warden.HasWarden) return;
var eligible = Utilities.GetPlayers()
.Where(player => player.PawnIsAlive)
Expand All @@ -124,7 +125,6 @@ protected void OnChooseWarden() {

if (eligible.Count == 0) {
locale.NoWardens.ToAllChat();
queueInactive = true;

return;
}
Expand Down Expand Up @@ -154,7 +154,6 @@ protected void OnChooseWarden() {

// Disable the warden raffle for future wardens
// (eg in the event of warden death)
queueInactive = true;
}

private bool canEnterQueue(CCSPlayerController player) {
Expand Down

0 comments on commit 889868f

Please sign in to comment.