CTakeDamageInfo:SetDamageForce - Useless or missuse?

dmginfo:SetDamageForce( Vector(0,0,0) )

Why does that not negate the push of an attack? I would assume, that would stop the force, but the swep still knocks the receiving player back. Am I using the wrong method?

Make it Vector(1, 0, 0)

Just tried it, but unfortunately it didn’t work, still knocks them back.

Try making it like 9999999 and see if it works at all

It’s some internal thing where if you set an inflictor in CDamageInfo, it’ll push people back, whether or not you set the force to 99999999999 or 0. It’s pretty annoying when in DoPlayerDeath, the velocity wasn’t the velocity the player was running at when he died…

That doesn’t seem the case with built-in fists swep, does it?

I did some more testing and Kuro was right, if you apply damage using it, it will still knock them back. I am using the stock fists that come with gmod, and it still did it. I’ve gotten around the knock back by applying the damage to a new player health variable instead, the nullify the damage and apply it (so it still runs the player damaged hook) and it seems to work the way I wanted it. Just seems strange that the original method didn’t work. Would this be classed as a bug then?