v0.4.0 D375: crouch now emits C-down (the engine's real crouch input), not B

bondview2.c reads crouchDown = insightaimmode && (buttons & (D_JPAD|D_CBUTTONS))
(5318/5579): crouch is C-down WHILE IN AIM MODE, never the B button. M3's
IA_CROUCH -> GE_CONT_B (and the CrouchMode=1 latch) was inert, so crouch
never fired in the GEPD layout. Hold + latch now emit GE_CONT_D (0x0004).
N64-faithful side effect: S (IA_BACK, also C-down) crouches while aiming.
User re-test: aim (RMB/Left Shift) + Left Ctrl; hold or F10 Toggle.
This commit is contained in:
James Dansereau committed 2026-09-27 16:47:55 -04:00
1 parent fca07bdd9a
commit 2e0643c70f
3 files changed
+36 -7

No files matched your search

+11 -7
View File
@@ -1211,20 +1211,24 @@ unsigned inputComputePad(int idx, signed char *stick_x, signed char *stick_y)
}
if (actHeld(ks, IA_CANCEL)) /* D145: Escape is in the default Cancel bind */
button |= GE_CONT_B;
/* v0.4.0 M3: reload (B tap, same as any B press) and crouch
* (hold, or a latched toggle). Both are unbound by default (the
* N64-original layout), so this is a no-op out of the box; the
* game's B-context logic decides reload-vs-crouch as on N64. */
/* v0.4.0 M3: reload (B tap, same as any B press). Unbound in the
* N64 layout (no-op out of the box). */
if (actHeld(ks, IA_RELOAD))
button |= GE_CONT_B;
/* D375: crouch = C-DOWN while in aim (insight) mode -- that is
* what bondview2.c reads (crouchDown = insightaimmode && D-bit,
* lines 5318/5579); the B button is NOT the crouch input. S
* (IA_BACK, also C-down) crouches while aiming exactly as on
* N64. Hold, or latched toggle; a latch is never carried into
* a menu. */
int crouchNow = actHeld(ks, IA_CROUCH);
if (crouchMode == 1) {
if (crouchNow && !s_crouchHeldPrev) s_crouchLatch ^= 1;
if (menuMode) s_crouchLatch = 0; /* never carry B into a menu */
if (s_crouchLatch) button |= GE_CONT_B;
if (menuMode) s_crouchLatch = 0; /* never carry C-down into a menu */
if (s_crouchLatch) button |= GE_CONT_D;
s_crouchHeldPrev = crouchNow;
} else if (crouchNow) {
button |= GE_CONT_B;
button |= GE_CONT_D;
}
if (actHeld(ks, IA_LEAN_L))
button |= GE_CONT_L;