🐛 fixed double call on invoke local flag in ragon property

This commit is contained in:
2024-01-21 12:20:47 +03:00
parent 0cd912a1aa
commit 89d130a193
+5 -4
View File
@@ -63,7 +63,7 @@ namespace Ragon.Client
protected void InvokeChanged()
{
if (!InvokeLocal)
if (_entity.HasAuthority)
return;
Changed?.Invoke();
@@ -71,7 +71,8 @@ namespace Ragon.Client
protected void MarkAsChanged()
{
InvokeChanged();
if (InvokeLocal)
Changed?.Invoke();
if (_dirty || _entity == null)
return;
@@ -112,8 +113,8 @@ namespace Ragon.Client
Serialize(_propertyBuffer);
var propertySize = (ushort) _propertyBuffer.WriteOffset;
buffer.WriteUShort(propertySize);;
var propertySize = (ushort)_propertyBuffer.WriteOffset;
buffer.WriteUShort(propertySize);
buffer.CopyFrom(_propertyBuffer, propertySize);
}