public static void SmartIndirectFireArc(MissileLauncherEffect __instance, ref bool ___isIndirect) { try { if (___isIndirect || !__instance.weapon.IndirectFireCapable) { return; } if (!ShouldSmartIndirect(__instance.weapon.parent, Combat.FindCombatantByGUID(__instance.hitInfo.targetId))) { return; } ___isIndirect = true; } catch (Exception ex) { Error(ex); } }
// Raising the preFireDuration for Steak SRM launchers to give their targeting laser enough time to display their vfx public static void Prefix(MissileLauncherEffect __instance, Weapon weapon) { try { if (weapon.Type == WeaponType.SRM && weapon.AmmoCategoryValue.Name == "SRMStreak") { float oldPFD = __instance.preFireDuration; __instance.preFireDuration = 0.9f; Logger.Debug($"[MissileLauncherEffect_Init_PREFIX] ({weapon.parent.DisplayName}) Raised preFireDuration for {weapon.Name} from {oldPFD} to {__instance.preFireDuration}"); } } catch (Exception e) { Logger.Error(e); } }