perf[protocol]: all protocol files are generated in a single protocol file

This commit is contained in:
godotg committed 2023-11-30 17:48:08 +08:00
1 parent 263536945c
commit c00cab0e53
1 file changed
+2 -2
@@ -3,7 +3,7 @@ function Protocols.{}:protocolId()
end end
function Protocols.{}:protocolName() function Protocols.{}:protocolName()
return {} return Protocols.{}
end end
function Protocols.{}:__tostring() function Protocols.{}:__tostring()
@@ -26,7 +26,7 @@ function Protocols.{}:read(buffer)
return nil return nil
end end
local beforeReadIndex = buffer:getReadOffset() local beforeReadIndex = buffer:getReadOffset()
local packet = {}:new() local packet = Protocols.{}:new()
{} {}
if length > 0 then if length > 0 then
buffer:setReadOffset(beforeReadIndex + length) buffer:setReadOffset(beforeReadIndex + length)