feat(movement): spacebar charged jump with skill-based height
Hold spacebar to charge (0→1 over 1s), release to jump. Height from GetJumpHeight formula using Jump skill via PlayerWeenie. Jump physics use MotionInterpreter.jump() → LeaveGround() → get_leave_ground_velocity(). JumpExtent is returned in MovementResult (non-null when jump fires this frame) so GameWindow can log and eventually send the server jump packet. Double-jump is prevented by jump_is_allowed() checking Contact+OnWalkable flags before allowing another jump. Tests updated to use charge-then-release pattern matching the new input model. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5cb14da714
commit
0bec5d5296
3 changed files with 46 additions and 10 deletions
|
|
@ -1912,6 +1912,13 @@ public sealed class GameWindow : IDisposable
|
|||
forcePositionSequence: _liveSession.ForcePositionSequence);
|
||||
_liveSession.SendGameAction(body);
|
||||
}
|
||||
|
||||
if (result.JumpExtent.HasValue)
|
||||
{
|
||||
// TODO: send jump packet to server (format needs research from holtburger).
|
||||
// Local jump physics work without server acknowledgment for now.
|
||||
Console.WriteLine($"jump: extent={result.JumpExtent.Value:F2}");
|
||||
}
|
||||
}
|
||||
|
||||
// Update the player entity's animation cycle to match current motion.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue