fix stick-tilt blending

This commit is contained in:
minenice55 2026-03-07 23:04:52 -05:00
parent c9710a361a
commit 02fffa75de
2 changed files with 6 additions and 7 deletions

View file

@ -93,7 +93,7 @@
#define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291
#define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b
#define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9
#define ASSET_HASH_MAIN_PK3 0xceb926d00133de51
#define ASSET_HASH_MAIN_PK3 0x9a54c263d9f325cd
#define ASSET_HASH_MAPPATCH_PK3 0x1745690024efbaf8
#define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461
#ifdef USE_PATCH_FILE

View file

@ -1720,12 +1720,11 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
// if stick input is used gradually cancel out tilt based on stick intensity
if (cv_tiltcontrol[forplayer].value == 1)
{
accelerometertilt = joystickvector.xaxis +
FixedMul(
FRACUNIT-FixedDiv(joystickvector.xaxis, JOYAXISRANGE),
G_GetGamepadTilt(forplayer)*FRACUNIT
)/FRACUNIT;
}
fixed_t rate = FixedDiv(abs(joystickvector.xaxis), JOYAXISRANGE);
accelerometertilt =
(FixedMul(rate, joystickvector.xaxis*FRACUNIT)/FRACUNIT) +
(FixedMul(FRACUNIT-rate, G_GetGamepadTilt(forplayer)*FRACUNIT)/FRACUNIT);
}
// For kart, I've turned the aim axis into a digital axis because we only
// use it for aiming to throw items forward/backward and the vote screen