Facepunch / garrysmod-issues

Garry's Mod issue tracker
145 stars 56 forks source link

bullet structure callback unreliable hitgroups #2187

Open DeltaPhantom opened 9 years ago

DeltaPhantom commented 9 years ago

In the bullet structure used by ENTITY:FireBullets(bullet), using the following:

bullet.Callback = function(att, tr, dmg) print(tr.HitGroup) end

Results in the following console spew on a weapon with perfect accuracy and 10 pellets to a shot, aiming low-center mass.

3 0 3 0 3 0 3 0 3 0

Identical for both client and server. The 3s are accurate. (HITGROUP_STOMACH) It's the 0s that are the problem. (HITGROUP_GENERIC) The results are similar regardless of where you aim. Adding spread gives no change to the '0 spots', but the 'good' hits show variance as expected. (ex: Some hitting head, some hitting chest)

Edit: Am not on dev branch.

robotboy655 commented 9 years ago

It's not bullet callbacks only, it's any bullet damage.

DeltaPhantom commented 9 years ago

Can it be fixed?

Jvs34 commented 8 years ago

This seems to be related to https://github.com/Facepunch/garrysmod-requests/issues/618 , since half of the bullets are actually turned into hulltraces, and hulltraces ignore hitgroup checks.