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

EGP Patches #2838

Merged
merged 1 commit into from
Nov 11, 2023
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
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_egp/lib/egplib/parenting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ local function GetGlobalPos(self, Ent, index)
return obj.verticesindex ~= nil, { x = vec.x, y = vec.y, angle = -ang.y }
else
local _, data = GetGlobalPos(Ent, select(3, EGP:HasObject(Ent, obj.parent)))
local vec, ang = LocalToWorld(Vector(obj._x, obj._y, 0), Angle(0, -obj._angle or 0, 0), Vector(data.x, data.y, 0), Angle(0, -data.angle or 0, 0))
local vec, ang = LocalToWorld(Vector(obj._x, obj._y, 0), Angle(0, -(obj._angle or 0), 0), Vector(data.x, data.y, 0), Angle(0, -(data.angle or 0), 0))
return obj.verticesindex ~= nil, { x = vec.x, y = vec.y, angle = -ang.y }
end
end
Expand Down
3 changes: 1 addition & 2 deletions lua/entities/gmod_wire_egp/lib/objects/poly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ function Obj:SetPos(x, y, angle)
if not angle then angle = sa else angle = angle % 360 end
if sx == x and sy == y and sa == angle then return false end

for i, v in ipairs(self.vertices) do
for _, v in ipairs(self.vertices) do
local vec = LocalToWorld(Vector(v.x - sx, v.y - sy, 0), angle_zero, Vector(x, y, 0), Angle(0, sa - angle, 0))
v.x = vec.x
v.y = vec.y
end
self.x, self.y, self.angle = x, y, angle
if self._x then self._x, self._y, self._angle = x, y, angle end
return true
end

Expand Down
4 changes: 3 additions & 1 deletion lua/entities/gmod_wire_egp_hud/huddraw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ else -- SERVER
end
end

net.Receive("EGP_HUD_Unlink", function(len, ply)
util.AddNetworkString("EGP_HUD_Unlink")

net.Receive("EGP_HUD_Unlink", function(_, ply)
unlinkUser(ply)
end)

Expand Down
Loading