Process parent indexes serverside only (#2950)

This commit is contained in:
Denneisk 2023-12-23 08:18:32 -05:00 committed by GitHub
parent 3ab71d12c0
commit 95de2a81cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -71,6 +71,11 @@ function baseObj:SetPos(x, y, angle)
angle = angle % 360
if self.angle ~= angle then self.angle, ret = angle, true end
end
if SERVER and self._x then
if x then self._x = x end
if y then self._y = y end
if angle then self._angle = angle end
end
return ret
end
function baseObj:Set(member, value)

View File

@ -71,7 +71,7 @@ function Obj:SetPos(x, y, angle, x2, y2)
self.x, self.y, self.angle = x, y, angle
if self._x then self._x, self._y, self._angle, self._x2, self._y2 = x, y, angle, x2, y2 end
if SERVER and self._x then self._x, self._y, self._angle, self._x2, self._y2 = x, y, angle, x2, y2 end
return true
end

View File

@ -125,6 +125,7 @@ function Obj:SetPos(x, y, angle)
v.y = vec.y
end
self.x, self.y, self.angle = x, y, angle
if SERVER and self._x then self._x, self._y, self._angle = x, y, angle end
return true
end