engine: client: fix Joy_GetHatValueForAxis threshold for forward axis, fix bindings limit

This commit is contained in:
Alibek Omarov
2026-04-17 22:28:50 +05:00
parent 49248f5e14
commit bfdfeb3dc0

View File

@@ -197,7 +197,7 @@ static int Joy_GetHatValueForAxis( const engineAxis_t engineAxis )
positive = JOY_HAT_RIGHT;
break;
case JOY_AXIS_FWD:
threshold = joy_side_key_threshold.value;
threshold = joy_forward_key_threshold.value;
negative = JOY_HAT_UP;
positive = JOY_HAT_DOWN;
break;
@@ -318,7 +318,7 @@ void Joy_FinalizeMove( float *fw, float *side, float *dpitch, float *dyaw )
const char *bind = joy_axis_binding.string;
size_t i;
for( i = 0; bind[i]; i++ )
for( i = 0; bind[i] && i < MAX_AXES; i++ )
{
switch( bind[i] )
{