From 0ac0bb00f5cbc092700abb0695feb4b8aefdf7c4 Mon Sep 17 00:00:00 2001 From: Denneisk <20892685+Denneisk@users.noreply.github.com> Date: Wed, 4 Dec 2024 21:05:24 -0500 Subject: [PATCH] Add holo local pos/ang --- .../gmod_wire_expression2/core/hologram.lua | 14 ++++++++++++++ lua/wire/client/e2descriptions.lua | 2 ++ 2 files changed, 16 insertions(+) diff --git a/lua/entities/gmod_wire_expression2/core/hologram.lua b/lua/entities/gmod_wire_expression2/core/hologram.lua index 2bd0ba57bb..ec984d4610 100644 --- a/lua/entities/gmod_wire_expression2/core/hologram.lua +++ b/lua/entities/gmod_wire_expression2/core/hologram.lua @@ -1006,6 +1006,13 @@ e2function void holoPos(index, vector position) WireLib.setPos(Holo.ent, position) end +e2function void holoLocalPos(index, vector position) + local holo = CheckIndex(self, index) + if not holo then return end + + WireLib.setLocalPos(holo.ent, position) +end + [nodiscard] e2function vector holoPos(index) local Holo = CheckIndex(self, index) @@ -1021,6 +1028,13 @@ e2function void holoAng(index, angle ang) WireLib.setAng(Holo.ent, ang) end +e2function void holoLocalAng(index, angle ang) + local holo = CheckIndex(self, index) + if not holo then return end + + WireLib.setLocalAng(holo.ent, ang) +end + [nodiscard] e2function angle holoAng(index) local Holo = CheckIndex(self, index) diff --git a/lua/wire/client/e2descriptions.lua b/lua/wire/client/e2descriptions.lua index 62ab6ad252..d2d85c3fe0 100644 --- a/lua/wire/client/e2descriptions.lua +++ b/lua/wire/client/e2descriptions.lua @@ -1294,6 +1294,8 @@ E2Helper.Descriptions["holoDeleteAll()"] = "Removes all holograms made by this E E2Helper.Descriptions["holoDisableShading(nn)"] = "If 1, supresses engine lighting when drawing this hologram" E2Helper.Descriptions["holoEntity(n)"] = "Returns the entity corresponding to the hologram given by the specified index" E2Helper.Descriptions["holoIndex(e)"] = "Returns the index of the given hologram entity" +E2Helper.Descriptions["holoLocalAng(na)"] = "Sets the local angle of the hologram" +E2Helper.Descriptions["holoLocalPos(nv)"] = "Sets the local position of the hologram" E2Helper.Descriptions["holoMaterial(ns)"] = "Sets the overlay material of the hologram" E2Helper.Descriptions["holoModel(ns)"] = "Sets the model.\nMust be from holoModelList unless wire_holograms_modelany is 1 (see holoModelAny())" E2Helper.Descriptions["holoModel(nsn)"] = "Sets the model and skin.\nMust be from holoModelList unless wire_holograms_modelany is 1 (see holoModelAny())"