Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
pingu7867 committed Sep 18, 2024
1 parent 41a73ec commit e9fb223
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lua/pac3/editor/client/parts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3280,17 +3280,13 @@ function pace.AddQuickSetupsToPartMenu(menu, obj)
end)
end):SetIcon("icon16/calculator.png")
lua_menu:AddOption("X-Ray hook (halos)", function()
obj:SetName("halos on") obj:SetString([["hook.Add("PreDrawHalos","xray_halos", function() halo.Add(ents.FindByClass("npc_combine_s"), Color(255,0,0), 5, 5, 5, true, true) end)"]])
local newobj = pac.CreatePart("command") newobj:SetParent(obj.Parent) obj:SetName("halos off") obj:SetString([["hook.Remove("PreDrawHalos","xray_halos")"]])
obj:SetName("halos on") obj:SetString([["hook.Add("PreDrawHalos","xray_halos", function() halo.Add(ents.FindByClass("npc_combine_s"), Color(255,0,0), 5, 5, 5, true, true) end)"]])
local newobj = pac.CreatePart("command") newobj:SetParent(obj.Parent) obj:SetName("halos off") obj:SetString([["hook.Remove("PreDrawHalos","xray_halos")"]])
obj:SetName("halos on") obj:SetString([[hook.Add("PreDrawHalos","xray_halos", function() halo.Add(ents.FindByClass("npc_combine_s"), Color(255,0,0), 5, 5, 5, true, true) end)]])
local newobj = pac.CreatePart("command") newobj:SetParent(obj.Parent) newobj:SetName("halos off") newobj:SetString([[hook.Remove("PreDrawHalos","xray_halos")]])
obj:SetUseLua(true) newobj:SetUseLua(true)
end):SetIcon("icon16/shading.png")
lua_menu:AddOption("X-Ray hook (ignorez)", function()
obj:SetName("ignoreZ on") obj:SetString([["hook.Add("PreDrawHalos","xray_halos", function() halo.Add(ents.FindByClass("npc_combine_s"), Color(255,0,0), 5, 5, 5, true, true) end)"]])
local newobj = pac.CreatePart("command") newobj:SetParent(obj.Parent) obj:SetName("halos off") obj:SetString([["hook.Remove("PreDrawHalos","xray_halos")"]])
obj:SetName("ignoreZ off") obj:SetString([["hook.Add("PostDrawTranslucentRenderables","xray_ignorez", function() cam.IgnoreZ( true ) for i,ent in pairs(ents.FindByClass("npc_combine_s")) do ent:DrawModel() end cam.IgnoreZ( false ) end)"]])
local newobj = pac.CreatePart("command") newobj:SetParent(obj.Parent) obj:SetName("halos off") obj:SetString([["hook.Remove("PostDrawTranslucentRenderables","xray_ignorez")"]])
obj:SetName("ignoreZ on") obj:SetString([[hook.Add("PostDrawTranslucentRenderables","xray_ignorez", function() cam.IgnoreZ( true ) for i,ent in pairs(ents.FindByClass("npc_combine_s")) do ent:DrawModel() end cam.IgnoreZ( false ) end)]])
local newobj = pac.CreatePart("command") newobj:SetName("ignoreZ off") newobj:SetParent(obj.Parent) newobj:SetString([[hook.Remove("PostDrawTranslucentRenderables","xray_ignorez")]])
obj:SetUseLua(true) newobj:SetUseLua(true)
end):SetIcon("icon16/shape_move_front.png")
elseif obj.ClassName == "bone3" then
Expand Down

0 comments on commit e9fb223

Please sign in to comment.