Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Hide weapon shadows
Browse files Browse the repository at this point in the history
Hide weapon shadows from ghosts/living players
  • Loading branch information
MinIsMin committed Aug 27, 2017
1 parent cf5f5c8 commit fb13331
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/cl_spectator_deathmatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,24 @@ hook.Add("PrePlayerDraw", "PrePlayerDraw_SpecDM", function(ply)
if IsValid(LocalPlayer()) and LocalPlayer():IsGhost() then
if not ply:IsGhost() and not showalive:GetBool() then
ply:DrawShadow(false)
ply:GetActiveWeapon():DrawShadow(false)
return true
elseif ply:IsTerror() then
ply:SetRenderMode(RENDERMODE_TRANSALPHA)
ply:SetColor(COLOR_GREY)
ply:DrawShadow(true)
ply:GetActiveWeapon():DrawShadow(true)
end
else
if ply:IsGhost() then
ply:DrawShadow(false)
ply:GetActiveWeapon():DrawShadow(false)
return true
else
ply:SetRenderMode(RENDERMODE_NORMAL)
ply:SetColor(COLOR_WHITE)
ply:DrawShadow(true)
ply:GetActiveWeapon():DrawShadow(true)
end
end
end)
Expand Down

0 comments on commit fb13331

Please sign in to comment.