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

IsEnemyPatch Improvements (Part 3) (!158)

Added null check to new `ContainsPlayer` helper method from !157

Reviewed-on: SPT/Modules#158
Co-authored-by: dwesterwick <dwesterwick@yahoo.com>
Co-committed-by: dwesterwick <dwesterwick@yahoo.com>
This commit is contained in:
dwesterwick 2024-08-17 07:05:43 +00:00 committed by chomp
parent ebac61e0a4
commit f8eb2374cb

View File

@ -74,7 +74,7 @@ namespace SPT.Custom.CustomAI
foreach (IPlayer player in players)
{
if (player.Id == playerToCheck.Id)
if (player != null && player.Id == playerToCheck.Id)
{
return true;
}