add replay reader and writer for handling tmcpr files

This commit is contained in:
adman
2026-05-10 18:41:04 +02:00
parent c56898e787
commit a8936d92a5
3 changed files with 108 additions and 1 deletions
+2 -1
View File
@@ -82,7 +82,7 @@ func UnpackPacket(r io.Reader) (packet proto_base.EncodeDecodeAble, err error) {
// Calculate position after reading the packet ID
// indexafterid represents how many bytes we've read so far
indexafterid := int(b.Size()) - int(b.Len())
indexafterid := int(b.Size()) - b.Len()
i, ok := proto.LookUpTypeByPacketInfo(proto_base.ToClient, state, packetId, int32(*ProtocolVersion))
if !ok {
@@ -103,6 +103,7 @@ func UnpackPacket(r io.Reader) (packet proto_base.EncodeDecodeAble, err error) {
}
return
}
func Run(args []string) (err error) {
err = cmd.Parse(args)
if err != nil {