Bug fix with near death effects

master
AlmTech 5 years ago
parent 395ee40207
commit a598e9c327
  1. 26
      gamemode/core/client/cl_hud.lua

@ -49,16 +49,18 @@ function GM:HUDPaint()
end end
hook.Add( "RenderScreenspaceEffects", "Quantum_HUD_RenderLowHealth", function() hook.Add( "RenderScreenspaceEffects", "Quantum_HUD_RenderLowHealth", function()
DrawColorModify( { if( LocalPlayer():Health() / LocalPlayer():GetMaxHealth() <= 0.15 ) then
[ "$pp_colour_addr" ] = 0, DrawMotionBlur( 0.4, 0.8, 0.1 )
[ "$pp_colour_addg" ] = 0, DrawColorModify( {
[ "$pp_colour_addb" ] = 0, [ "$pp_colour_addr" ] = 0,
[ "$pp_colour_brightness" ] = Lerp( LocalPlayer():Health() / LocalPlayer():GetMaxHealth(), -0.75, 0 ), [ "$pp_colour_addg" ] = 0,
[ "$pp_colour_contrast" ] = Lerp( LocalPlayer():Health() / LocalPlayer():GetMaxHealth(), 0.6, 1 ), [ "$pp_colour_addb" ] = 0,
[ "$pp_colour_colour" ] = Lerp( LocalPlayer():Health() / LocalPlayer():GetMaxHealth(), 0.2, 1 ), [ "$pp_colour_brightness" ] = Lerp( LocalPlayer():Health() / LocalPlayer():GetMaxHealth(), -0.75, 0 ),
[ "$pp_colour_mulr" ] = 0, [ "$pp_colour_contrast" ] = Lerp( LocalPlayer():Health() / LocalPlayer():GetMaxHealth(), 0.6, 1 ),
[ "$pp_colour_mulg" ] = 0, [ "$pp_colour_colour" ] = Lerp( LocalPlayer():Health() / LocalPlayer():GetMaxHealth(), 0.2, 1 ),
[ "$pp_colour_mulb" ] = 0 [ "$pp_colour_mulr" ] = 0,
} ) [ "$pp_colour_mulg" ] = 0,
if( LocalPlayer():Health() / LocalPlayer():GetMaxHealth() <= 0.15 ) then DrawMotionBlur( 0.4, 0.8, 0.1 ) end [ "$pp_colour_mulb" ] = 0
} )
end
end) end)

Loading…
Cancel
Save