diff --git a/examples/bmmo.bp b/examples/bmmo.bp index b16bcf2..8f4c3fd 100644 --- a/examples/bmmo.bp +++ b/examples/bmmo.bp @@ -25,13 +25,10 @@ natural reliable msg player_disconnected_msg { gnsid connection_id; } -narrow struct chat_body { +narrow reliable msg chat_msg { gnsid player_id; string chat_content; } -narrow reliable msg chat_msg { - chat_body data; -} // ============= v3.1 anti-cheat update chapter diff --git a/snippets/functions.py b/snippets/functions.py index 1ebc0f2..59abd27 100644 --- a/snippets/functions.py +++ b/snippets/functions.py @@ -28,7 +28,7 @@ def ReadOpCode(_ss: io.BytesIO) -> OpCode: return _opcode def PeekOpCode(_ss: io.BytesIO) -> OpCode: (_opcode, ) = _opcode_packer.unpack(_ss.read(_opcode_packer.size)) - _ss.seek(_opcode_packer.size, os.SEEK_CUR) + _ss.seek(-(_opcode_packer.size), os.SEEK_CUR) return _opcode def WriteOpCode(_opcode: OpCode, _ss: io.BytesIO): _ss.write(_opcode_packer.pack(_opcode))