Add holo local pos/ang (#3203)

This commit is contained in:
Denneisk 2024-12-06 02:55:04 +00:00 committed by GitHub
parent fa25826a45
commit 928f14bf5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View File

@ -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)

View File

@ -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())"