gamemode: Only show the selection halo for Hiders

The selection halo was previously visible to everyone in approximate mode, which caused more issues than it should have.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2017-11-26 04:26:23 +01:00
parent 624fc3968e
commit 677ff7b529
@@ -232,6 +232,8 @@ hook.Add("PostDrawTranslucentRenderables", "PHDrawNamePlates", DrawNamePlates)
function DrawSelectionHalo(bDrawingDepth, bDrawingSkybox)
if (!GAMEMODE.Config.SelectionHalo:Enabled()) then return end
if ((LocalPlayer():Team() == GAMEMODE.Teams.Hiders)
&& (player_manager.GetPlayerClass(LocalPlayer()) == "Hider")) then
local ent = nil
if (GAMEMODE.Config.SelectionHalo:Approximate()) then
local trace = {
@@ -272,6 +274,7 @@ function DrawSelectionHalo(bDrawingDepth, bDrawingSkybox)
GAMEMODE.Config.SelectionHalo:BlurX(), GAMEMODE.Config.SelectionHalo:BlurY(), GAMEMODE.Config.SelectionHalo:Passes(),
GAMEMODE.Config.SelectionHalo:Additive(), GAMEMODE.Config.SelectionHalo:IgnoreZ())
end
end
end
hook.Add("PostDrawEffects", "PHDrawSelectionHalo", DrawSelectionHalo)