gamemode: Only show nameplates for alive players
This commit is contained in:
@@ -208,6 +208,7 @@ function DrawNamePlates(bDrawingDepth, bDrawingSkybox)
|
||||
|
||||
for i,v in ipairs(pls) do
|
||||
if (v:Alive() && v != LocalPlayer()) then
|
||||
if (player_manager.GetPlayerClass(v) != "Spectator") then
|
||||
local color = HSVToColor(GAMEMODE.Config.NamePlates:TintHue(),
|
||||
GAMEMODE.Config.NamePlates:TintSaturation(),
|
||||
GAMEMODE.Config.NamePlates:TintValue())
|
||||
@@ -226,6 +227,7 @@ function DrawNamePlates(bDrawingDepth, bDrawingSkybox)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
hook.Add("PostDrawTranslucentRenderables", "PHDrawNamePlates", DrawNamePlates)
|
||||
|
||||
-- ------------------------------------------------------------------------- --
|
||||
|
||||
Reference in New Issue
Block a user