• Bullet player impact force
    2 replies, posted
When shooting a player from a SWEP, how in the hell do I prevent the player from being knocked back? bullet.Force does nothing TakeDamageInfo:SetDamageForce does nothing Force in the ammotype does nothing (these seem to only be for physics props, not players) phys_pushscale and phys_impactforcescale do nothing TakeDamageInfo:ScaleDamage(0) disables the force but then no damage. Setting the health or some other manual thing seems like a hacky workaround and it doesn't show the same hit effects. The force seems to be proportional to the damage. I did notice that TakeDamageInfo:SetInflictor seems to define the direction of the force (the force is in the direction from inflictor to target) The only "solution" i have right now is getting the velocity in ScalePlayerDamage then setting it back to that later. Doesn't work good due to client prediction and the delay and all that.
Check out this forum post might be what you're looking for Disabling Damage Knockback
Could you post specific weapons and code? Setting the damage force to vector_origin in EntityTakeDamage works for me.
Sorry, you need to Log In to post a reply to this thread.