Remove hl2 "damage effect"?

Is there a way to remove the viewpunch and the red screen when getting damaged?

Thanks in advance.

Check this page, it might be here:

I think “CHudDamageIndicator” is only for the red bar which shows you were the hit came from, but I am not 100% sure so I will check it out.

Thanks for reply. :slight_smile:

It just removed the red bars which shows the direction where the hit came from and the red screen.
The viewpunch is still there. :frowning:

Any other ideas?

Perhaps override a hook that determines whether or not to take damage. You could return false but manually set the player’s deducted health and check for <0 to kill.

That could work but are you sure this is a good Idea?
Well, I guess it would break other addons.


For the viewpunch it might be CalcView

What exactly is your idea?
How can I affect the viewpunch when getting damaged with the CalcView hook?

I think he meant something like this:

hook.Add( "CalcView", "NoPunch", function( ply, pos, angles, fov )
	local view = {}
	local ang = LocalPlayer():GetViewPunchAngles()
	if ang.y==0 or ang.p==0 then return end
	view.origin = pos
	view.angles = Angle(angles.p-ang.p,angles.y-ang.y,angles.r-ang.r)
	view.fov = fov

	return view

A better way would be (In theory):

	local ang = LocalPlayer():GetViewPunchAngles()
	if ang.y!=0 or ang.p!=0 then LocalPlayer():ViewPunchReset() end