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

Commit fb13331

Browse files
committed
Hide weapon shadows
Hide weapon shadows from ghosts/living players
1 parent cf5f5c8 commit fb13331

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lua/cl_spectator_deathmatch.lua

+4
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,24 @@ hook.Add("PrePlayerDraw", "PrePlayerDraw_SpecDM", function(ply)
100100
if IsValid(LocalPlayer()) and LocalPlayer():IsGhost() then
101101
if not ply:IsGhost() and not showalive:GetBool() then
102102
ply:DrawShadow(false)
103+
ply:GetActiveWeapon():DrawShadow(false)
103104
return true
104105
elseif ply:IsTerror() then
105106
ply:SetRenderMode(RENDERMODE_TRANSALPHA)
106107
ply:SetColor(COLOR_GREY)
107108
ply:DrawShadow(true)
109+
ply:GetActiveWeapon():DrawShadow(true)
108110
end
109111
else
110112
if ply:IsGhost() then
111113
ply:DrawShadow(false)
114+
ply:GetActiveWeapon():DrawShadow(false)
112115
return true
113116
else
114117
ply:SetRenderMode(RENDERMODE_NORMAL)
115118
ply:SetColor(COLOR_WHITE)
116119
ply:DrawShadow(true)
120+
ply:GetActiveWeapon():DrawShadow(true)
117121
end
118122
end
119123
end)

0 commit comments

Comments
 (0)