-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Vanilla 0.75 behaviour is to check intersections in this order, and stop the moment it hits one of these:
- Player 0 Body
- Player 0 Head
- Player 0 Limbs (3 parts, all do the same damage)
- Player 1 Body
- Player 1 Head
- Player 1 Limbs
- Player 2 Body
- Player 2 Head
- ...
- Player 31 Head
- Player 31 Limbs
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 .