From e7e1242ef4bc9ee3d45e89bb3207296868982b11 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 24 Nov 2024 02:41:29 +0100 Subject: [PATCH] allow w to jump --- src/game/player.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/player.rs b/src/game/player.rs index 691919a..32c12e2 100644 --- a/src/game/player.rs +++ b/src/game/player.rs @@ -102,7 +102,10 @@ fn move_player( moved = true; move_x += 1; } - if kb_input.pressed(KeyCode::Space) && vel.linvel.y < 0.1 && grounded { + if (kb_input.pressed(KeyCode::Space) || kb_input.pressed(KeyCode::KeyW)) + && vel.linvel.y < 0.1 + && grounded + { moved = true; move_y += 1; }