Skip to content

Commit

Permalink
Add holo local pos/ang
Browse files Browse the repository at this point in the history
  • Loading branch information
Denneisk committed Dec 5, 2024
1 parent 79f1429 commit 0ac0bb0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lua/entities/gmod_wire_expression2/core/hologram.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/client/e2descriptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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())"
Expand Down

0 comments on commit 0ac0bb0

Please sign in to comment.