Skip to content

Commit 928f14b

Browse files
authored
Add holo local pos/ang (#3203)
1 parent fa25826 commit 928f14b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lua/entities/gmod_wire_expression2/core/hologram.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,13 @@ e2function void holoPos(index, vector position)
10061006
WireLib.setPos(Holo.ent, position)
10071007
end
10081008

1009+
e2function void holoLocalPos(index, vector position)
1010+
local holo = CheckIndex(self, index)
1011+
if not holo then return end
1012+
1013+
WireLib.setLocalPos(holo.ent, position)
1014+
end
1015+
10091016
[nodiscard]
10101017
e2function vector holoPos(index)
10111018
local Holo = CheckIndex(self, index)
@@ -1021,6 +1028,13 @@ e2function void holoAng(index, angle ang)
10211028
WireLib.setAng(Holo.ent, ang)
10221029
end
10231030

1031+
e2function void holoLocalAng(index, angle ang)
1032+
local holo = CheckIndex(self, index)
1033+
if not holo then return end
1034+
1035+
WireLib.setLocalAng(holo.ent, ang)
1036+
end
1037+
10241038
[nodiscard]
10251039
e2function angle holoAng(index)
10261040
local Holo = CheckIndex(self, index)

lua/wire/client/e2descriptions.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,8 @@ E2Helper.Descriptions["holoDeleteAll()"] = "Removes all holograms made by this E
12941294
E2Helper.Descriptions["holoDisableShading(nn)"] = "If 1, supresses engine lighting when drawing this hologram"
12951295
E2Helper.Descriptions["holoEntity(n)"] = "Returns the entity corresponding to the hologram given by the specified index"
12961296
E2Helper.Descriptions["holoIndex(e)"] = "Returns the index of the given hologram entity"
1297+
E2Helper.Descriptions["holoLocalAng(na)"] = "Sets the local angle of the hologram"
1298+
E2Helper.Descriptions["holoLocalPos(nv)"] = "Sets the local position of the hologram"
12971299
E2Helper.Descriptions["holoMaterial(ns)"] = "Sets the overlay material of the hologram"
12981300
E2Helper.Descriptions["holoModel(ns)"] = "Sets the model.\nMust be from holoModelList unless wire_holograms_modelany is 1 (see holoModelAny())"
12991301
E2Helper.Descriptions["holoModel(nsn)"] = "Sets the model and skin.\nMust be from holoModelList unless wire_holograms_modelany is 1 (see holoModelAny())"

0 commit comments

Comments
 (0)