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

Added early exit to AddTraitorScavsPatch

This commit is contained in:
Chomp 2024-12-29 18:59:57 +00:00
parent e74c5313a8
commit 96e0be26cd

View File

@ -34,6 +34,11 @@ namespace SPT.Custom.Patches
_traitorChancePercent = JsonConvert.DeserializeObject<int>(json);
}
if (_traitorChancePercent == 0)
{
return true; // Do original method
}
WildSpawnType role = bot.Profile.Info.Settings.Role;
if (AiHelpers.BotIsPlayerScav(role, bot.Profile.Info.Nickname) && new Random().Next(1, 100) < _traitorChancePercent)
{