Add free downward jetpack on double-tap down mid-air
Some checks failed
Deploy / deploy (push) Has been cancelled

Double pressing the down arrow while airborne triggers a free downward
dash that doesn't consume jetpack charges. Uses a 0.3s window for the
double-tap detection, resets on landing.

Closes #9

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #12.
This commit is contained in:
2026-03-14 20:12:09 +00:00
committed by tas
parent 68856fb8c5
commit 90e3d5aec0
2 changed files with 30 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ typedef struct PlayerData {
AimDir aim_dir; /* current aim direction */
bool looking_up; /* holding up without moving */
float look_up_timer; /* how long up has been held */
/* Down-arrow double-tap (free downward jetpack) */
float down_tap_timer; /* time since last mid-air down press */
/* Death / Respawn */
float respawn_timer; /* countdown after death anim finishes */
Vec2 spawn_point; /* where to respawn */