Merge pull request #2 from OlegDzhuraev/fixes

Recursion fix and room bytes count corrected
This commit is contained in:
2022-05-18 21:39:45 +04:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -11,13 +11,15 @@ public class EntityState
public byte[] Data
{
get => Data;
get => _data;
set
{
Data = value;
_data = value;
isDirty = true;
}
}
private byte[] _data = Array.Empty<byte>();
public EntityState(RagonAuthority ragonAuthority)
{
+1 -1
View File
@@ -269,7 +269,7 @@ namespace Ragon.Core
foreach (var entity in _entities.Values)
{
var entityState = entity.State.Data.AsSpan();
var data = new byte[entity.State.Data.Length + 12];
var data = new byte[entity.State.Data.Length + 14];
Span<byte> sendData = data.AsSpan();
Span<byte> operationData = sendData.Slice(0, 2);