Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add holo local pos/ang #3203

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading