mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 05:10: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:
parent
ebac61e0a4
commit
f8eb2374cb
@ -74,7 +74,7 @@ namespace SPT.Custom.CustomAI
|
|||||||
|
|
||||||
foreach (IPlayer player in players)
|
foreach (IPlayer player in players)
|
||||||
{
|
{
|
||||||
if (player.Id == playerToCheck.Id)
|
if (player != null && player.Id == playerToCheck.Id)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user