/*▄▄▄▄ ███▄ ▄███▓ ▄████ ▄▄▄██▀▀▀▓█████▄▄▄█████▓ ▓█████▄ ▓██▒▀█▀ ██▒ ██▒ ▀█▒ ▒██ ▓█ ▀▓ ██▒ ▓▒ ▒██▒ ▄██▓██ ▓██░▒██░▄▄▄░ ░██ ▒███ ▒ ▓██░ ▒░ ▒██░█▀ ▒██ ▒██ ░▓█ ██▓▓██▄██▓ ▒▓█ ▄░ ▓██▓ ░ ░▓█ ▀█▓▒██▒ ░██▒░▒▓███▀▒ ▓███▒ ░▒████▒ ▒██▒ ░ ░▒▓███▀▒░ ▒░ ░ ░ ░▒ ▒ ▒▓▒▒░ ░░ ▒░ ░ ▒ ░░ ▒░▒ ░ ░ ░ ░ ░ ░ ▒ ░▒░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ */ using HarmonyLib; using Oxide.Core.Plugins; using System.Collections.Generic; namespace Oxide.Plugins { [Info("SamsShootDown", "bmgjet", "1.0.0")] class SamsShootDown : RustPlugin { [AutoPatch] [HarmonyPatch(typeof(SamSite), "TargetScan")] public static class SamSite_TargetScan { //Remove //samSiteTarget2.CenterPoint().y >= this.eyePoint.transform.position.y private static IEnumerable Transpiler(IEnumerable instructions) { byte pos = 0; foreach (CodeInstruction instruction in instructions) { if(pos == 0 && instruction.operand != null && instruction.operand.ToString().EndsWith("CenterPoint()")){ pos = 1;} if (pos > 0) { instruction.opcode = System.Reflection.Emit.OpCodes.Nop; instruction.operand = null; if (pos++ >= 9){ break; } } } return instructions; } } } }