mesh loader v2

This commit is contained in:
Nikita Kruglickiy
2021-03-23 00:42:00 +06:00
parent 39a1f63822
commit 4c12c9d9ed
7 changed files with 173 additions and 5 deletions

View File

@@ -22,7 +22,6 @@ function MeshBuilder:initialize(link, maxQuota)
net.receive("holograms", function()
local hasNext = net.readBit()
local test = {}
while hasNext == 1 do
local name = net.readString()
@@ -30,14 +29,16 @@ function MeshBuilder:initialize(link, maxQuota)
local holo = ent:toHologram()
table.insert(self._objects, {name = name, holo = holo})
table.insert(test, {name = name, holo = holo})
end)
hasNext = net.readBit()
end
self:onHologramsReceived(self._objects)
self:_applyMeshes()
timer.simple(0, function()
self:onHologramsReceived(self._objects)
end)
end)
end