fixed: websocket server wrong execution thread
This commit is contained in:
@@ -3,9 +3,8 @@ using Ragon.Common;
|
||||
|
||||
namespace Ragon.Core.Game;
|
||||
|
||||
public class EntityState
|
||||
public class EntityState
|
||||
{
|
||||
private Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
private List<EntityStateProperty> _properties;
|
||||
private Entity _entity;
|
||||
|
||||
@@ -23,7 +22,7 @@ public class EntityState
|
||||
public void Write(RagonSerializer serializer)
|
||||
{
|
||||
serializer.WriteUShort(_entity.Id);
|
||||
|
||||
|
||||
for (int propertyIndex = 0; propertyIndex < _properties.Count; propertyIndex++)
|
||||
{
|
||||
var property = _properties[propertyIndex];
|
||||
|
||||
@@ -24,8 +24,8 @@ public class EntityStateProperty
|
||||
public ReadOnlySpan<byte> Read()
|
||||
{
|
||||
var dataSpan = _data.AsSpan();
|
||||
|
||||
return dataSpan.Slice(0, Size);
|
||||
var src = dataSpan.Slice(0, Size);
|
||||
return src;
|
||||
}
|
||||
|
||||
public void Write(ref ReadOnlySpan<byte> src)
|
||||
|
||||
Reference in New Issue
Block a user