- Change
math.sqrt
into ^.5
(Slightly faster)
- Simplify the
defineNamespace
(Breaking change)
-- before
return HandyNet.defineNamespace("example", function()
return {
hello = HandyNet.definePacket(
"client->server",
HandyNet.struct({
message = HandyNet.string(HandyNet.u8), -- Customizable string size (defaults to u16)
cf = HandyNet.CFrame, -- Uses quaternion to compress!
enum = HandyNet.Enum.KeyCode :: Enum.KeyCode -- Weird type error with enums..
})
-- default: "reliable"
),
countUp = HandyNet.defineEvent("unreliable")
}
end)
-- after
return HandyNet.defineNamespace("example", {
hello = HandyNet.definePacket(
"client->server",
HandyNet.struct({
message = HandyNet.string(HandyNet.u8), -- Customizable string size (defaults to u16)
cf = HandyNet.CFrame, -- Uses quaternion to compress!
enum = HandyNet.Enum.KeyCode :: Enum.KeyCode -- Weird type error with enums..
})
-- default: "reliable"
),
countUp = HandyNet.defineEvent("unreliable")
})