From 96e0be26cdc65ce58698ccbec673027917e08af1 Mon Sep 17 00:00:00 2001 From: Chomp Date: Sun, 29 Dec 2024 18:59:57 +0000 Subject: [PATCH] Added early exit to `AddTraitorScavsPatch` --- project/SPT.Custom/Patches/AddTraitorScavsPatch.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs b/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs index 94e8abb..73d093f 100644 --- a/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs +++ b/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs @@ -34,6 +34,11 @@ namespace SPT.Custom.Patches _traitorChancePercent = JsonConvert.DeserializeObject(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) {