From e9fb2238ca785dbb54531f99999f0c3d1b7af638 Mon Sep 17 00:00:00 2001 From: pingu7867 Date: Wed, 18 Sep 2024 19:42:39 -0400 Subject: [PATCH] hotfix --- lua/pac3/editor/client/parts.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lua/pac3/editor/client/parts.lua b/lua/pac3/editor/client/parts.lua index 34f5f83fd..e2a282d4d 100644 --- a/lua/pac3/editor/client/parts.lua +++ b/lua/pac3/editor/client/parts.lua @@ -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