Skip to content

Commit

Permalink
Fix HNS pickups
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Aug 29, 2024
1 parent 611e439 commit 1d1a38d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mod/Jailbreak.SpecialDay/SpecialDays/HideAndSeekDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public HnsSettings() {
cachedGuardWeapons = CV_GUARD_WEAPONS.Value.Split(",").ToHashSet();
cachedPrisonerWeapons = CV_PRISONER_WEAPONS.Value.Split(",").ToHashSet();

if (cachedGuardWeapons.Count == 0) cachedGuardWeapons = null;
if (cachedPrisonerWeapons.Count == 0) cachedPrisonerWeapons = null;
if (CV_GUARD_WEAPONS.Value.Length == 0) cachedGuardWeapons = null;
if (CV_PRISONER_WEAPONS.Value.Length == 0) cachedPrisonerWeapons = null;
}

public override int InitialHealth(CCSPlayerController player) {
Expand Down
3 changes: 2 additions & 1 deletion mod/Jailbreak.SpecialDay/SpecialDays/SpeedrunDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ private void endRound() {

if (CV_WINNER_DAMAGEABLE.Value) EnableDamage(winner);

Plugin.DeregisterEventHandler<EventItemPickup>(OnPickup);

foreach (var weapon in CV_LOSERS_WEAPONS.Value.Split(','))
foreach (var loser in losers)
loser.GiveNamedItem(weapon);
Expand All @@ -703,7 +705,6 @@ private void endRound() {
winner.GiveNamedItem(weapon);

Plugin.RemoveListener<Listeners.OnTick>(checkFinishers);
Plugin.DeregisterEventHandler<EventItemPickup>(OnPickup);
RoundUtil.SetTimeRemaining(Math.Min(timeToSet, CV_WIN_TIME_MAX.Value));
Server.ExecuteCommand("mp_ignore_round_win_conditions 0");
return;
Expand Down

0 comments on commit 1d1a38d

Please sign in to comment.