mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-23 15:40:43 +00:00
add Jump trigger sync
This commit is contained in:
parent
6ee84bce7a
commit
8b83b20caa
@ -127,5 +127,21 @@ namespace QSB.Animation.Patches
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(PlayerAnimController), nameof(PlayerAnimController.OnPlayerJump))]
|
||||
public static bool OnPlayerJumpReplacement(PlayerAnimController __instance)
|
||||
{
|
||||
__instance._ungroundedTime = Time.time;
|
||||
if (!__instance.isActiveAndEnabled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
__instance._animator.SetTrigger("Jump");
|
||||
var playerAnimationSync = QSBPlayerManager.LocalPlayer.AnimationSync;
|
||||
QSBEventManager.FireEvent(EventNames.QSBAnimTrigger, playerAnimationSync.AttachedNetId, "Jump");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user