bugfix 07/10/26 + evil laugh

This commit is contained in:
Ferdinando 2026-10-07 17:31:29 +02:00
commit 0159f1e8c4
11 changed files with 417 additions and 8 deletions

View file

@ -601,4 +601,30 @@ namespace RacesOfValheim
return true;
}
}
/// <summary>
/// The rest of the human's attack loop, shut while a dragon form is up: crossbow reload and draw
/// live in PlayerAttackInput, and the form's Animator fires the held attack through
/// OnAttackTrigger. Without these a crossbow in hand shot on every form attack. See Fenrir's
/// BlockPlayerAttackInputPatch.
/// </summary>
[HarmonyPatch(typeof(Player), "PlayerAttackInput")]
public static class SkadiBlockAttackInputPatch
{
public static bool Prefix(Player __instance)
{
if (__instance != Player.m_localPlayer) return true;
return __instance.GetComponentInChildren<DrakeFormBehavior>() == null;
}
}
[HarmonyPatch(typeof(Humanoid), nameof(Humanoid.OnAttackTrigger))]
public static class SkadiBlockAttackTriggerPatch
{
public static bool Prefix(Humanoid __instance)
{
if (__instance != Player.m_localPlayer) return true;
return __instance.GetComponentInChildren<DrakeFormBehavior>() == null;
}
}
}