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

Removed redundant code from patch

This commit is contained in:
Dev 2024-08-01 17:41:55 +01:00
parent c2839ed54b
commit edfe0451ac

View File

@ -41,12 +41,6 @@ namespace SPT.Custom.Patches
} }
var isEnemy = false; // default not an enemy var isEnemy = false; // default not an enemy
if (requester == null)
{
__result = isEnemy;
return false; // Skip original
}
// Check existing enemies list // Check existing enemies list
// Could also check x.Value.Player?.Id - BSG do it this way // Could also check x.Value.Player?.Id - BSG do it this way
@ -55,8 +49,7 @@ namespace SPT.Custom.Patches
__result = true; __result = true;
return false; // Skip original return false; // Skip original
} }
else
{
// Weird edge case - without this you get spammed with key already in enemy list error when you move around on lighthouse // Weird edge case - without this you get spammed with key already in enemy list error when you move around on lighthouse
// Make zryachiy use existing isEnemy() code // Make zryachiy use existing isEnemy() code
if (__instance.InitialBotType == WildSpawnType.bossZryachiy) if (__instance.InitialBotType == WildSpawnType.bossZryachiy)
@ -96,7 +89,6 @@ namespace SPT.Custom.Patches
__instance.AddEnemy(requester, EBotEnemyCause.checkAddTODO); __instance.AddEnemy(requester, EBotEnemyCause.checkAddTODO);
} }
} }
}
__result = isEnemy; __result = isEnemy;