mirror of
https://github.com/wiremod/wire.git
synced 2025-03-04 03:03:04 -05:00
Fix egp datastreams (#3145)
* Send vertices for poly objects properly * Send datastream after player is added to table * Use IMaterial if the value is a string
This commit is contained in:
parent
7dd11e5c17
commit
235f883bff
@ -85,7 +85,11 @@ function baseObj:EditObject(args)
|
||||
end
|
||||
for k, v in pairs(args) do
|
||||
if self[k] ~= nil and self[k] ~= v then
|
||||
self[k] = v
|
||||
if CLIENT and k == "material" and isstring(v) then
|
||||
self[k] = Material(v)
|
||||
else
|
||||
self[k] = v
|
||||
end
|
||||
ret = true
|
||||
end
|
||||
end
|
||||
|
@ -53,7 +53,7 @@ Obj.Receive = function( self )
|
||||
return tbl
|
||||
end
|
||||
Obj.DataStreamInfo = function( self )
|
||||
return { material = self.material, r = self.r, g = self.g, b = self.b, a = self.a, filtering = self.filtering, parent = self.parent, x = self.x, y = self.y, angle = self.angle }
|
||||
return { material = self.material, r = self.r, g = self.g, b = self.b, a = self.a, filtering = self.filtering, parent = self.parent, x = self.x, y = self.y, angle = self.angle, vertices = self.vertices }
|
||||
end
|
||||
|
||||
function Obj:Contains(x, y)
|
||||
|
@ -145,12 +145,13 @@ else -- SERVER
|
||||
|
||||
local function EGPHudConnect(ent, state, ply)
|
||||
if state then
|
||||
EGP:SendDataStream(ply, ent:EntIndex(), true)
|
||||
if not ent.Users then ent.Users = {} end
|
||||
|
||||
if not ent.Users[ply] then
|
||||
ent.Users[ply] = true
|
||||
end
|
||||
|
||||
EGP:SendDataStream(ply, ent:EntIndex(), true)
|
||||
elseif ent.Users and ent.Users[ply] then
|
||||
ent.Users[ply] = nil
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user