xtreme8000 / BetterSpades

BetterSpades, an Ace of Spades client targeted at low end systems (GL/ES 1.1). Runs on your grandmother's rig!
https://aos.party/jenkins/job/BetterSpades/
GNU General Public License v3.0
243 stars 40 forks source link

Arms should not block headshots #196

Open iamgreaser opened 7 months ago

iamgreaser commented 7 months ago

Vanilla 0.75 behaviour is to check intersections in this order, and stop the moment it hits one of these:

At the time of writing, both OpenSpades and BetterSpades follow the more logical approach of tracking which body part is hit first. Unfortunately, this also means that arms block headshots.

A potential solution is to re-order the list of body part checks in player_intersection_choose() and turn the list of ifs into an if-elseif-elseif chain.

The alternative is to follow 0.75 exactly, which has the weird side-effect that you can aim a shot at Player 14's head but then somehow intersect with Player 9's leg in the distance, and... well, you hit Player 9's leg instead of Player 14's head. It's an acceptable solution, it's just also unintuitive and awkward.

Cross-referencing yvt/openspades#1096 .