Repository navigation
fix: SH-048 crouch — the input + controller half (repairs main) - #20
Merged
Merged
Conversation
main.ts already calls updatePlayerController(..., wantSprint, input.crouchDown) and reads isCrouching() for the animation tier, but the two files that DEFINE those landed separately — so main did not compile at all. This is the other half. - input.ts: crouchDown on InputState, held on C (Ctrl is already dodge). Touch returns false; there is no crouch control on the phone yet. - player.ts: CROUCH_MUL 0.45 (4.5 -> ~2.0 m/s), crouch state in P[7], and the crouch param. Crouch WINS over sprint — you cannot do both, and holding crouch is the more deliberate intent. Cleared on dodge and on resetPlayerMotion. Crouch is speed + pose only for now: the capsule is NOT resized, so it does not shrink the hitbox or fit under low geometry (the arena has none). That would be setCharacterShape — a follow-up. Verified through the REAL keys (LOCOPROBE + SendInput scancode, not a forced flag): walk 4.50 -> Shift 9.00 (sprint=1) -> C 2.03 (crouch=1), and the game boots and runs past the load with isCrouching() resolving at runtime. Claude-Session: https://claude.ai/code/session_01J1UWgMcrTNvwWeXcJ1T3Fp
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughKeyboard input now exposes a crouch control through ChangesCrouch control
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
maincurrently does not compile:main.tsalready callsupdatePlayerController(..., wantSprint, input.crouchDown)and readsisCrouching()for the animation tier, but the two files that define thoselanded separately. This is the missing half.
input.ts—crouchDownonInputState, held on C (Ctrl is alreadydodge). Touch returns
false; there is no crouch control on the phone yet.player.ts—CROUCH_MUL0.45 (4.5 → ~2.0 m/s), crouch state inP[7],and the
crouchparam. Crouch wins over sprint — you cannot do both, andholding crouch is the more deliberate intent. Cleared on dodge and on
resetPlayerMotion.Scope, stated honestly
Crouch is speed + pose only. The capsule is not resized, so it does not
shrink the hitbox or fit under low geometry (the arena has none). That would be
setCharacterShape— a follow-up.Verification
Driven through the real keys (LOCOPROBE +
SendInputscancode — not a forcedflag, which is what hid the sprint bug for so long):
shiftKey=1sprint=1cKey=1crouch=1Game boots and runs past the load with
isCrouching()resolving at runtime (thereal risk here — Perry resolves cross-module refs at runtime, so a green compile
proves nothing).
Needs engine PR Bloom-Engine/engine#99 for Shift to reach the game at all.
https://claude.ai/code/session_01J1UWgMcrTNvwWeXcJ1T3Fp
Summary by CodeRabbit