♻️ plugin api

This commit is contained in:
2023-04-14 14:32:04 +04:00
parent 6c4a51534a
commit fc28f512ba
21 changed files with 155 additions and 97 deletions
@@ -32,10 +32,14 @@ public sealed class EntityStateOperation: IRagonOperation
for (var entityIndex = 0; entityIndex < entitiesCount; entityIndex++)
{
var entityId = reader.ReadUShort();
if (room.Entities.TryGetValue(entityId, out var entity))
entity.Read(player, reader);
if (room.Entities.TryGetValue(entityId, out var entity) && entity.TryReadState(player, reader))
{
room.Track(entity);
}
else
{
_logger.Error($"Entity with Id {entityId} not found, replication interrupted");
}
}
}
}