mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +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;
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(OWInput), nameof(OWInput.Update))]
|
[HarmonyPatch(typeof(AbstractCommands), nameof(AbstractCommands.Update))]
|
||||||
public static bool OWInput_Update()
|
public static bool AbstractCommands_Update(AbstractCommands __instance)
|
||||||
=> QSBInputManager.Instance.InputsEnabled;
|
{
|
||||||
|
__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