Glowing entities

Post Reply
Riyuzakisan
New to forums
New to forums
Posts: 12
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Nov 13, 2013 10:42 am

Glowing entities

Post by Riyuzakisan »

In this recent bugfix update to Garry's Mod, a new feature/bug was introduced. Every entity you hover over has a glowing outline/halo effect around it.

This is quite an annoyance on my TTT server, and there doesn't seem to be any easy way to disable or configure how it works.

If you want to disable this completely, go to lua/includes/modules/properties.lua, and around line 162 (in the “PreDrawHalos, PropertiesHover” hook), comment out this line of code:
halo.Add( { ent }, c, 2, 2, 2, true, false )


For clarity, here's the code for that entire hook, with the halo code commented out:

Code: Select all

hook.Add( "PreDrawHalos", "PropertiesHover", function()

	if ( vgui.GetHoveredPanel() != vgui.GetWorldPanel() && vgui.GetHoveredPanel() != g_ContextMenu ) then return end

	local ent = properties.GetHovered( EyePos(), LocalPlayer():GetAimVector() )
	if ( !IsValid( ent ) ) then return end
	
	local c = Color( 255, 255, 255, 255 )
	c.r = 200 + math.sin( RealTime() * 50 ) * 55
	c.g = 200 + math.sin( RealTime() * 20 ) * 55
	c.b = 200 + math.cos( RealTime() * 60 ) * 55
	
	-- Comment this part out
	-- halo.Add( { ent }, c, 2, 2, 2, true, false )

end )

If anyone has any alternative workarounds to this, feel free to share.
Post Reply