source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Hitbox registration, what happened?

Open ghost opened this issue 13 years ago • 4 comments

I don't have any technical details about this problem, but ever since we updated our mod from 2007 to 2013 our hitboxes are really off. No one can get shots on a moving target even if they are up close. Wondering if there is anything we can do about this? (This isn't just me, it's everyone who plays, there's plenty video evidence as well.)

ghost avatar Oct 08 '13 01:10 ghost

I've heard this from multiple sources, but there hasn't been any conclusive evidence that something is wrong. I've looked at the built in hitbox debugging code, such as sv_showlagcompensation, which shows that lag compensation is working correctly.

You may want to investigate that lag compensation is indeed still working in your mod, as certain situations may turn it off (for example putting all players on the same time with mp_friendlyfire 0).

azuisleet avatar Oct 08 '13 01:10 azuisleet

People have been complaining about hitbox registration since the beginning of time and usually I dismiss it as people complaining they have poor aim, but then I noticed that at high velocities (eg if two people jump off a building and start shooting at each other, yes that happens in my game) a shot aimed at dead center of a reasonably close target in zero lag situations (listenserver vs bots) will miss completely. I haven't done any more testing than that though, which I should do since our run speed is on the high side, but my guess is that there's something to this claim. Will report once that testing happens.

BSVino avatar Oct 08 '13 02:10 BSVino

Try increasing the maxDistance float in bool WantsLagCompensationOnEntity in your player code?

This probably isn't responsible, but we were experiencing more inaccurate hit registration the faster players moved and this did seem to help a bit (it wasn't ever completely off, though), worth a shot.

twincannon avatar Nov 27 '13 11:11 twincannon

After examining the WantsLagCompensationOnEntity() method I discovered what @tonysergi has known for a while - the CBasePlayer version of the method returns false if the two players are on the same team, effectively turning lag compensation off for everyone in deathmatch. It's an easy fix, but it means every DM mod using boilerplate code will have no lag compensation by default.

BSVino avatar Dec 01 '13 02:12 BSVino