From 95de6c0175bc628979cf50ad83a69e765c17a158 Mon Sep 17 00:00:00 2001 From: CWX Date: Thu, 26 Dec 2024 21:24:31 +0000 Subject: [PATCH] fix tratorpatch --- project/SPT.Custom/Patches/AddTraitorScavsPatch.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs b/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs index fac3f42..94e8abb 100644 --- a/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs +++ b/project/SPT.Custom/Patches/AddTraitorScavsPatch.cs @@ -26,7 +26,7 @@ namespace SPT.Custom.Patches } [PatchPrefix] - public static bool PatchPrefix(ref BotsGroup __result, IBotGame ____game, DeadBodiesController ____deadBodiesController, BotOwner bot, BotZone zone) + public static bool PatchPrefix(ref BotsGroup __result, DeadBodiesController ____deadBodiesController, BotOwner bot, BotZone zone, BotSpawner __instance) { if (!_traitorChancePercent.HasValue) { @@ -43,7 +43,7 @@ namespace SPT.Custom.Patches var player = Singleton.Instance.MainPlayer; var enemies = new List(); var players = new List() { player }; - var botsGroup = new BotsGroup(zone, ____game, bot, enemies, ____deadBodiesController, players, false); + var botsGroup = new BotsGroup(zone, __instance.BotGame, bot, enemies, ____deadBodiesController, players, false); // Because we don't want to use the zone-specific group, we add the new group with no key. This is similar to free for all Singleton.Instance.BotsController.BotSpawner.Groups.AddNoKey(botsGroup, zone);