0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 06:10:45 -05:00

prevent IsEnemyPatch enemy list check fail when it's null

This commit is contained in:
Dev 2023-07-12 18:21:21 +01:00
parent 86d86144ba
commit 2edf259271

View File

@ -50,7 +50,7 @@ namespace Aki.Custom.Patches
} }
// Check existing enemies list // Check existing enemies list
if (__instance.Enemies.Any(x=> x.Value.Player.Id == requester.Id)) if (!__instance.Enemies.IsNullOrEmpty() && __instance.Enemies.Any(x=> x.Value.Player.Id == requester.Id))
{ {
isEnemy = true; isEnemy = true;
} }