Add duckjump stuff

This commit is contained in:
LightCat 2019-03-25 21:34:10 +01:00
parent 83082da416
commit e90baccfe9
2 changed files with 2 additions and 2 deletions

View File

@ -435,7 +435,7 @@ static void autoJump()
return;
if (getNearestPlayerDistance().second <= *jump_distance)
current_user_cmd->buttons |= IN_JUMP;
current_user_cmd->buttons |= IN_JUMP | IN_DUCK;
}
enum slots

View File

@ -607,7 +607,7 @@ static void cm()
}
// Detect when jumping is necessary
if ((!(g_pLocalPlayer->holding_sniper_rifle && g_pLocalPlayer->bZoomed) && crumb->z - g_pLocalPlayer->v_Origin.z > 18 && last_jump.test_and_set(200)) || (last_jump.test_and_set(200) && inactivity.check(3000)))
current_user_cmd->buttons |= IN_JUMP;
current_user_cmd->buttons |= IN_JUMP | IN_DUCK;
// If inactive for too long
if (inactivity.check(*stuck_time))
{