fixed: initial dirty property not tracked
This commit is contained in:
@@ -73,11 +73,8 @@ namespace Ragon.Client
|
|||||||
if (_dirty)
|
if (_dirty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_entity != null)
|
|
||||||
{
|
|
||||||
_dirty = true;
|
_dirty = true;
|
||||||
_entity.TrackChangedProperty(this);
|
_entity?.TrackChangedProperty(this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Flush()
|
internal void Flush()
|
||||||
@@ -91,9 +88,12 @@ namespace Ragon.Client
|
|||||||
_ticks++;
|
_ticks++;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void AssignEntity(RagonEntity obj)
|
internal void AssignEntity(RagonEntity ent)
|
||||||
{
|
{
|
||||||
_entity = obj;
|
_entity = ent;
|
||||||
|
|
||||||
|
if (_dirty)
|
||||||
|
_entity.TrackChangedProperty(this);
|
||||||
|
|
||||||
Changed?.Invoke();
|
Changed?.Invoke();
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ namespace Ragon.Client
|
|||||||
|
|
||||||
Serialize(buffer);
|
Serialize(buffer);
|
||||||
|
|
||||||
var propSize = (uint) (buffer.WriteOffset - propOffset);
|
var propSize = (uint)(buffer.WriteOffset - propOffset);
|
||||||
buffer.Write(propSize, 16, sizeOffset);
|
buffer.Write(propSize, 16, sizeOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user