Skip to content

Commit

Permalink
fix for an inverted condition, oopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
marchellc committed Aug 5, 2024
1 parent f846e06 commit 10bb073
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions LabExtended/Patches/Events/RecontainingPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ public static bool Prefix(Scp079Recontainer __instance)

list.AddRange(ExPlayer.Get(x => x.Role.Is(RoleTypeId.Scp079) && x.Switches.CanBeRecontainedAs079));

if (list.Count < 1)
{
ListPool<ExPlayer>.Shared.Return(list);
return false;
}

var recontainingArgs = new Scp079RecontainingArgs(ExPlayer.Get(__instance._activatorGlass.LastAttacker), list);

if (!HookRunner.RunCancellable(recontainingArgs, true))
Expand All @@ -46,7 +40,7 @@ public static bool Prefix(Scp079Recontainer __instance)

foreach (var player in list)
{
if (recontainingArgs.Activator is null)
if (recontainingArgs.Activator is not null)
player.Hub.playerStats.DealDamage(new RecontainmentDamageHandler(recontainingArgs.Activator.Footprint));
else
player.Hub.playerStats.DealDamage(new UniversalDamageHandler(-1f, DeathTranslations.Recontained));
Expand Down

0 comments on commit 10bb073

Please sign in to comment.