From 11f6789af21138ae805d34ecc2d600ec268b0dfa Mon Sep 17 00:00:00 2001 From: Misfiy <85962933+Misfiy@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:39:53 +0100 Subject: [PATCH] fix --- .../Patches/Events/Map/ExplodingFlashGrenade.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs index 4413d18299..0884e28710 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.Patches.Events.Map { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; using API.Features; @@ -64,7 +65,7 @@ private static IEnumerable Transpiler(IEnumerable targetToAffect = HashSetPool.Pool.Get(); - foreach (Player player in Player.List) + foreach (Player player in ReferenceHub.AllHubs.Select(Player.Get)) { if ((instance.transform.position - player.Position).sqrMagnitude >= distance) continue; @@ -88,9 +89,7 @@ private static void ProcessEvent(FlashbangGrenade instance, float distance) return; foreach (Player player in explodingGrenadeEvent.TargetsToAffect) - { instance.ProcessPlayer(player.ReferenceHub); - } } } } \ No newline at end of file