Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0f1f844e3 | ||
|
|
24f62d70e1 |
No files matched your search
+14
-1
@@ -61,7 +61,7 @@ public class FullAuto : SonsMod
|
|||||||
_ => FireMode.Auto
|
_ => FireMode.Auto
|
||||||
};
|
};
|
||||||
CheckFireInputPatch.CancelBurst();
|
CheckFireInputPatch.CancelBurst();
|
||||||
SonsTools.ShowMessage(ModeName(), 2f);
|
ShowMode();
|
||||||
RLog.Msg($"FullAuto mode: {ModeName()}");
|
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()
|
internal static void Announce()
|
||||||
{
|
{
|
||||||
var text = Enabled ? $"{ModeName()} ({Rpm} RPM)" : "FullAuto OFF";
|
var text = Enabled ? $"{ModeName()} ({Rpm} RPM)" : "FullAuto OFF";
|
||||||
@@ -195,6 +200,7 @@ internal static class CheckFireInputPatch
|
|||||||
private static float _nextShot;
|
private static float _nextShot;
|
||||||
private static int _burstLeft;
|
private static int _burstLeft;
|
||||||
private static float _lastGunTime = -1f;
|
private static float _lastGunTime = -1f;
|
||||||
|
private static IntPtr _lastGunPtr = IntPtr.Zero;
|
||||||
private static bool _triggerDown;
|
private static bool _triggerDown;
|
||||||
private static float _releasedFor;
|
private static float _releasedFor;
|
||||||
private static bool _actionFailed;
|
private static bool _actionFailed;
|
||||||
@@ -330,6 +336,13 @@ internal static class CheckFireInputPatch
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
var allowed = IsAllowed(__instance);
|
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;
|
_lastGunTime = allowed ? Time.time : -1f;
|
||||||
|
|
||||||
if (!FullAuto.Enabled || !allowed)
|
if (!FullAuto.Enabled || !allowed)
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"id": "FullAuto",
|
"id": "FullAuto",
|
||||||
"name": "FullAuto",
|
"name": "FullAuto",
|
||||||
"author": "JustinOros",
|
"author": "JustinOros",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"description": "Hold fire to shoot any gun full-auto at a configurable rate",
|
"description": "Hold fire to shoot any gun full-auto at a configurable rate",
|
||||||
"gameVersion": "1.0.0",
|
"gameVersion": "1.0.0",
|
||||||
"platform": "Client",
|
"platform": "Client",
|
||||||
|
|||||||
Reference in new issue
Block a user