Skip to content

Instantly share code, notes, and snippets.

@pdr52

pdr52/file2.lua Secret

Created June 16, 2018 20:39
Show Gist options
  • Save pdr52/09569a6d40a38ce5cb424f154d24042f to your computer and use it in GitHub Desktop.
Save pdr52/09569a6d40a38ce5cb424f154d24042f to your computer and use it in GitHub Desktop.
local materialType
local count = 0;
print("while start")
while raknetBitStreamGetNumberOfUnreadBits(bs) > 0 do
count = count + 1;
print("while iteration x" .. count, raknetBitStreamGetNumberOfUnreadBits(bs));
materialType = read.int8(bs)
if materialType == MATERIAL_TYPE.TEXTURE then
table.insert(data.materials, read_object_material(bs))
elseif materialType == MATERIAL_TYPE.TEXT then
table.insert(data.materialText, read_object_material_text(bs))
end
end
print("while end")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment