Skip to content

Hitbox group pen - #2002

Open
AdamTadeusz wants to merge 3 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:366_hitboxgrouppen
Open

Hitbox group pen#2002
AdamTadeusz wants to merge 3 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:366_hitboxgrouppen

Conversation

@AdamTadeusz

@AdamTadeusz AdamTadeusz commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Any bullet that hits a player model extremity now does a second check where it hit a player while ignoring those hitbox groups, generally decreasing the ttk as for example arms no longer block shots to the chest.

Currently stops shots that would have gibbed a model from doing so if the shot ends up hitting a main hitbox behind it, I'm going to say that's fine for now? My explanation for that is uhh the limb has something to brace against so it doesn't pop off as easily.

Might need to ask the community what they think.

Shotguns are very scary now.

Tbh even an srm shreds now.

Toolchain

  • Windows MSVC VS2022

@AdamTadeusz
AdamTadeusz marked this pull request as draft June 30, 2026 17:42
@AdamTadeusz
AdamTadeusz requested a review from a team June 30, 2026 18:57
@AdamTadeusz
AdamTadeusz marked this pull request as ready for review June 30, 2026 18:57
tr.surface.flags = SURF_HITBOX;
tr.surface.surfaceProps = physprops->GetSurfaceIndex( pBone->pszSurfaceProp() );

if (fContentsMask & CONTENTS_HITBOX)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only changes from the CBaseAnimating baseclass implementation should be in this if loop, I've skipped the ismultiplayer checks in the other player classes that otherwise scale the player's hitbox down in singleplayer

@AdamTadeusz AdamTadeusz added the New Changes for Reviewers New changes has been made. This label is mostly to notify reviewers. label Jul 30, 2026

@sunmachine sunmachine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just nit-picks so far, like taking a second pass at some indentations here and there, cleanup a TODO, blah blah.

The only thing I thought I had a bite on was HITBOX_GEAR as pondering why/how it would be used. Then I realize we don't use those hit boxes at all, do we?

Then I'm toying around on raycast perf, but even the worst case is a big "so what".

Good addition. LGTM.

@AdamTadeusz

Copy link
Copy Markdown
Contributor Author

We indeed don't use HITBOX_GEAR. I thought that it might be for things like pouches or other jiggle bones or whatever attached to the player model, but now I'm wondering if it's used for things like ballistic shields, and if so, we actually definitely shouldn't be doing this check, so I think ill remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Changes for Reviewers New changes has been made. This label is mostly to notify reviewers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants