Skip to content

Commit

Permalink
cgame: keep scoped reticle draw a bit longer
Browse files Browse the repository at this point in the history
  • Loading branch information
Aranud committed Apr 28, 2024
1 parent 1564f8b commit 48dfda3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/cgame/cg_draw.c
Expand Up @@ -1735,19 +1735,18 @@ void CG_DrawCrosshair(hudComponent_t *comp)
}

// special reticle for scoped weapon
if (cg.zoomed)
if (GetWeaponTableData(weapnum)->type & WEAPON_TYPE_SCOPED)
{
if (!BG_PlayerMounted(cg.snap->ps.eFlags))
{
// don't let players run with rifles -- speed 80 == crouch, 128 == walk, 256 == run until player start to don't run
// but don't unscope due to extra speed while in air, as we may just have slide a step or a slope
if (VectorLength(cg.snap->ps.velocity) > 127)
{
if (GetWeaponTableData(cg.snap->ps.weapon)->type & WEAPON_TYPE_SCOPED)
{
CG_FinishWeaponChange(cg.snap->ps.weapon, GetWeaponTableData(cg.snap->ps.weapon)->weapAlts);
return;
}
if (GetWeaponTableData(cg.snap->ps.weapon)->type & WEAPON_TYPE_SCOPED)
{
CG_FinishWeaponChange(cg.snap->ps.weapon, GetWeaponTableData(cg.snap->ps.weapon)->weapAlts);
}
}

if (
Expand Down

0 comments on commit 48dfda3

Please sign in to comment.