mirror of
https://github.com/thirteen-io/Advanced-Bone-Tool.git
synced 2025-03-04 03:13:35 -05:00
Tool now highlights the selected entity.
This commit is contained in:
parent
525f5771ae
commit
9e658726fc
@ -68,6 +68,26 @@ if CLIENT then
|
||||
local bone = net.ReadFloat()
|
||||
UpdateAdvBoneMenu( ent, bone )
|
||||
end )
|
||||
|
||||
local shouldGlow = false
|
||||
hook.Add( "OnContextMenuOpen", "Advanced Bone Tool", function()
|
||||
shouldGlow = ( LocalPlayer():GetTool().Name == "Advanced Bone Tool" )
|
||||
end )
|
||||
|
||||
hook.Add( "OnContextMenuClose", "Advanced Bone Tool", function()
|
||||
shouldGlow = false
|
||||
end )
|
||||
|
||||
hook.Add( "PreDrawHalos", "Advanced Bone Tool", function()
|
||||
if ( !shouldGlow ) then return end
|
||||
local ply = LocalPlayer()
|
||||
local ent = ply:GetNWEntity( "AdvBoneEntity" )
|
||||
local col = ply:GetWeaponColor() * 255
|
||||
if ( IsValid( ent ) ) then
|
||||
halo.Add( {ent}, Color( col.r, col.g, col.b ) )
|
||||
halo.Add( {ent}, Color( 255, 255, 255, 100 ) )
|
||||
end
|
||||
end )
|
||||
else
|
||||
util.AddNetworkString( "UpdateAdvBoneMenu" )
|
||||
util.AddNetworkString( "UpdateAdvBoneSettings" )
|
||||
|
Loading…
Reference in New Issue
Block a user