From 5ca80533922b5ca59fd138648e6ef029e76b0709 Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 17 Jan 2021 16:22:20 -0600 Subject: [PATCH] Fixed transports using segment offsets --- ServerProject-DONT-IMPORT-INTO-UNITY/RelayHandler.cs | 2 +- UnityTransport/LightReflectiveMirrorTransport.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ServerProject-DONT-IMPORT-INTO-UNITY/RelayHandler.cs b/ServerProject-DONT-IMPORT-INTO-UNITY/RelayHandler.cs index 6cd53cc..b44303d 100644 --- a/ServerProject-DONT-IMPORT-INTO-UNITY/RelayHandler.cs +++ b/ServerProject-DONT-IMPORT-INTO-UNITY/RelayHandler.cs @@ -33,7 +33,7 @@ namespace LightReflectiveMirror try { var data = segmentData.Array; - int pos = 0; + int pos = segmentData.Offset; OpCodes opcode = (OpCodes)data.ReadByte(ref pos); diff --git a/UnityTransport/LightReflectiveMirrorTransport.cs b/UnityTransport/LightReflectiveMirrorTransport.cs index 90657fd..ccc8339 100644 --- a/UnityTransport/LightReflectiveMirrorTransport.cs +++ b/UnityTransport/LightReflectiveMirrorTransport.cs @@ -91,7 +91,7 @@ namespace LightReflectiveMirror try { var data = segmentData.Array; - int pos = 0; + int pos = segmentData.Offset; OpCodes opcode = (OpCodes)data.ReadByte(ref pos);