Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arms should not block headshots #1096

Open
iamgreaser opened this issue Mar 8, 2024 · 0 comments
Open

Arms should not block headshots #1096

iamgreaser opened this issue Mar 8, 2024 · 0 comments

Comments

@iamgreaser
Copy link
Contributor

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 build up a bit mask for body parts which have been hit for the closest-hit player (clearing the mask when we've encountered a closer player), and then pick the bit in the mask which has priority.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant