This commit is contained in:
2022-10-16 18:00:32 +04:00
parent 1558b5eefb
commit 5519ae7679
4 changed files with 9 additions and 7 deletions
+2 -3
View File
@@ -15,13 +15,12 @@ public class Entity
public ushort StaticId { get; private set; }
public ushort EntityType { get; private set; }
public ushort OwnerId { get; private set; }
public byte[] Payload { get; private set; }
public RagonAuthority Authority { get; private set; }
private List<EntityProperty> _properties;
private List<EntityEvent> _bufferedEvents;
public byte[] Payload { get; set; }
public Entity(GameRoom room, ushort ownerId, ushort entityType, ushort staticId, RagonAuthority eventAuthority)
{
OwnerId = ownerId;
@@ -50,7 +49,7 @@ public class Entity
{
_properties.Add(property);
}
public void ReplicateEvent(ushort peerId, ushort eventId, ReadOnlySpan<byte> payload, RagonReplicationMode eventMode, RagonTarget targetMode)
{
if (Authority == RagonAuthority.OwnerOnly && OwnerId != peerId)