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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user