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

Fix impossibility of crit with powerless firearms #53287

Closed
wants to merge 1 commit into from
Closed

Fix impossibility of crit with powerless firearms #53287

wants to merge 1 commit into from

Conversation

wwkk222208
Copy link
Contributor

@wwkk222208 wwkk222208 commented Dec 8, 2021

Summary

None

Purpose of change

When I was testing my PR, I found that I couldn't hit the hulk on the head with a 7.62 caliber gun. I tried to check the relevant code and found that if the damage of a single shot does not exceed the max hp of the target's head, then this shot will not hit the head. I don't know if the author of this code has a special intention, but I think this is very unreasonable. So I decide to modify it.

Describe the solution

Remove the restriction that it is possible to hit the head and crit only when the damage is high enough.

Describe alternatives you've considered

Testing

Shoot a hulk with a 7.62 caliber gun, and it can get 'headshot' and crit.

Additional context

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Dec 8, 2021
@wwkk222208 wwkk222208 changed the title Fixed impossibility of crit with powerless firearms Fix impossibility of crit with powerless firearms Dec 8, 2021
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Dec 8, 2021
@Alex-Folts
Copy link
Contributor

Looking at git blame, there was similar PR: #46455 which was reverted by this commit: John-Candlebury@c23adf7

Seems like this is intentional behavior.

@wwkk222208
Copy link
Contributor Author

wwkk222208 commented Dec 8, 2021

Perhaps the author believes that mosquito bites should not be critically hit, which is is understandable.
But at least mosquitoes can bite the head. lol

@wwkk222208
Copy link
Contributor Author

I checked the PR and the subsequent revert, the purpose of revert seems to be to prevent world_modifier from being calculated twice.

@wapcaplet wapcaplet added [C++] Changes (can be) made in C++. Previously named `Code` Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics labels Dec 9, 2021
@waveyl
Copy link
Contributor

waveyl commented Dec 9, 2021

#39203 seems to be relevant.
image

@kevingranade
Copy link
Member

Hitting the head or not is a cosmetic issue, the goal here is that you need sufficient damage/penetration to reach vitals with a strike or projectile, this behavior is fully intentional.
This is mitigated somewhat with the weak point system, which models things like hitting an eye or similar to allow easier penetration.

@wwkk222208
Copy link
Contributor Author

wwkk222208 commented Dec 9, 2021

Hitting the head or not is a cosmetic issue, the goal here is that you need sufficient damage/penetration to reach vitals with a strike or projectile, this behavior is fully intentional.
This is mitigated somewhat with the weak point system, which models things like hitting an eye or similar to allow easier penetration.

Well, that seems to be good too.
But even if it doesn't hit critically, the projectile should be able to hit the head. @kevingranade

@kevingranade
Copy link
Member

If it's not doing extra damage it doesn't matter where it hits, again, it's cosmetic.
A "headshot" is a special exception where it calls out where the target is hit, if it's a non-critical hit-to-the-head it's no longer that special case and it will be confusing to call it out differently.
It's possible weak points are not interacting with the crit code in such a way as to make what I sketched out happen, if so fixing that would be nice.

@wwkk222208
Copy link
Contributor Author

wwkk222208 commented Dec 9, 2021

In some cases, it is more than just cosmetic. For example, feral human will never hit the head of a player with a fragile skull.

A non-critical hit-to-the-head can be displayed as a normal good hit, so that it won’t confuse the player

@kevingranade
Copy link
Member

It IS displayed as a good hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants