October 2022
Posted 2 years ago
We removed hitgroups in favour of tags, similar to how we use them for collisions. Here's how they work.

MODELDOC

When editing a hitbox from ModelDoc, you'll see Hitbox Tags. Populate them with some useful keywords like so:

C# API

When running traces, you'll see TraceResult.Hitbox. That'll hold all the info you'll need when interacting with hitboxes. We also pass it with DamageInfo.

Before, it didn't make much sense:
var isHeadshot = GetHitboxBone( dmg.HitboxIndex ) == 1;
With tags, it's way easier to understand at a glance:
var isHeadshot = damageInfo.Hitbox.HasTag( "head" ); if ( isHeadshot ) { // Multiply headshot damage by 2 damageInfo.Damage *= 2f; }