0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00

Ensure we only alter Playerscavs IsAi Data

This commit is contained in:
Kaeno 2024-03-23 12:48:51 +00:00
parent 44748dc0a6
commit b327096980
2 changed files with 7 additions and 2 deletions

View File

@ -29,7 +29,12 @@ namespace Aki.SinglePlayer.Patches.ScavMode
if (Singleton<GameWorld>.Instance.GetEverExistedPlayerByID(playerProfileId) is Player killedPlayer)
{
__state = new Tuple<Player, bool>(killedPlayer, killedPlayer.AIData.IsAI);
// Extra check to ensure we only set playerscavs to IsAI = false
if (killedPlayer.Profile.Info.Settings.Role == WildSpawnType.assault && killedPlayer.Profile.Nickname.Contains("("))
{
killedPlayer.AIData.IsAI = false;
}
player.Loyalty.method_1(killedPlayer);
}
}