From 24f62d70e1ef6608b7d7df5a9506d106f4c775ed Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Tue, 15 Sep 2026 23:04:01 -0700 Subject: [PATCH] Show fire mode when switching to a gun --- FullAuto.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/FullAuto.cs b/FullAuto.cs index b8f189d..7e79dcf 100644 --- a/FullAuto.cs +++ b/FullAuto.cs @@ -61,7 +61,7 @@ public class FullAuto : SonsMod _ => FireMode.Auto }; CheckFireInputPatch.CancelBurst(); - SonsTools.ShowMessage(ModeName(), 2f); + ShowMode(); RLog.Msg($"FullAuto mode: {ModeName()}"); } } @@ -128,6 +128,11 @@ public class FullAuto : SonsMod }; } + internal static void ShowMode() + { + SonsTools.ShowMessage(ModeName(), 2f); + } + internal static void Announce() { var text = Enabled ? $"{ModeName()} ({Rpm} RPM)" : "FullAuto OFF"; @@ -195,6 +200,7 @@ internal static class CheckFireInputPatch private static float _nextShot; private static int _burstLeft; private static float _lastGunTime = -1f; + private static IntPtr _lastGunPtr = IntPtr.Zero; private static bool _triggerDown; private static float _releasedFor; private static bool _actionFailed; @@ -330,6 +336,13 @@ internal static class CheckFireInputPatch return true; var allowed = IsAllowed(__instance); + var ptr = __instance.Pointer; + + if (allowed && FullAuto.Enabled && (!HoldingGun || ptr != _lastGunPtr)) + FullAuto.ShowMode(); + + if (allowed) + _lastGunPtr = ptr; _lastGunTime = allowed ? Time.time : -1f; if (!FullAuto.Enabled || !allowed)