Skip to content

Commit

Permalink
bot_fortress: only aim for head as sniper with a primary weapon
Browse files Browse the repository at this point in the history
  • Loading branch information
pongo1231 committed Jan 1, 2025
1 parent 35e86a4 commit a5dbe29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions utils/RCBot2_meta/bot_fortress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7078,9 +7078,12 @@ void CBotTF2 ::modAim(edict_t *pEntity, Vector &v_origin, Vector *v_desired_offs

if (m_iClass == TF_CLASS_SNIPER)
{
Vector eye;
gameclients->ClientEarPosition(pEntity, &eye);
v_desired_offset->z = (eye - v_origin).z;
if (pWepInfo->getSlot() == 0)
{
Vector eye;
gameclients->ClientEarPosition(pEntity, &eye);
v_desired_offset->z = (eye - v_origin).z;
}
}
}
}
Expand Down

0 comments on commit a5dbe29

Please sign in to comment.