mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-29 03:28:26 +00:00
fix inputs sticking (TEST)
This commit is contained in:
parent
165ae8fdaf
commit
cb4a3d49be
@ -9,7 +9,18 @@ internal class InputPatches : QSBPatch
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(OWInput), nameof(OWInput.Update))]
|
||||
public static bool OWInput_Update()
|
||||
=> QSBInputManager.Instance.InputsEnabled;
|
||||
[HarmonyPatch(typeof(AbstractCommands), nameof(AbstractCommands.Update))]
|
||||
public static bool AbstractCommands_Update(AbstractCommands __instance)
|
||||
{
|
||||
__instance.Consumed = false;
|
||||
__instance.WasActiveLastFrame = __instance.IsActiveThisFrame;
|
||||
__instance.IsActiveThisFrame = false;
|
||||
|
||||
if (__instance.WasActiveLastFrame)
|
||||
{
|
||||
__instance.InputStartedTime = float.MaxValue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user