fix: Draugh eats Bjorn and Volture meat, Alfar levitation on gamepad
Draugh: add BjornMeat -> CookedBjornMeat to the raw-to-cooked table and correct VoltureMeat's cooked name (RoastedVoltureMeat does not exist, CookedVoltureMeat does), so neither raw meat got an EdibleUncooked_ item. Names checked against the SoftRef manifests. Alfar: ZInput "Jump" is the keyboard binding only. Read "JoyJump" and "JoyCrouch" too, as PlayerController does, for levitation and the Archon's climb and descent. Reported by lexsonn.
This commit is contained in:
parent
45248acd74
commit
b9ec452e72
2 changed files with 13 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ namespace RacesOfValheim
|
|||
float target = 0f;
|
||||
if (Time.time - AlfarArchon.StartedAt < 0.6f) target = 4f; // lift off
|
||||
else if (RaceInput.Allowed && JumpHeld()) target = speed;
|
||||
else if (RaceInput.Allowed && ZInput.GetButton("Crouch")) target = -speed;
|
||||
else if (RaceInput.Allowed && CrouchHeld()) target = -speed;
|
||||
|
||||
Vector3 velocity = flyer.linearVelocity;
|
||||
velocity.y = Mathf.Lerp(velocity.y, target, 0.25f);
|
||||
|
|
@ -97,9 +97,15 @@ namespace RacesOfValheim
|
|||
|
||||
private static bool JumpHeld()
|
||||
{
|
||||
// ZInput's "Jump" covers the space bar and the pad's jump button alike, and respects the
|
||||
// controls the player picked in the settings.
|
||||
return ZInput.GetButton("Jump");
|
||||
// "Jump" is the keyboard binding only; the pad's button is a separate "JoyJump", read
|
||||
// the way PlayerController reads it, kept off while a radial menu has the pad.
|
||||
return ZInput.GetButton("Jump") || (ZInput.GetButton("JoyJump") && !Hud.InRadial());
|
||||
}
|
||||
|
||||
private static bool CrouchHeld()
|
||||
{
|
||||
// Same split as jump: PlayerController ORs "Crouch" with "JoyCrouch".
|
||||
return ZInput.GetButton("Crouch") || (ZInput.GetButton("JoyCrouch") && !Hud.InRadial());
|
||||
}
|
||||
|
||||
private static void FlushSpend(Player player)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue