Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 27db256902 | |||
| 8705e93929 | |||
| 08e931d1bd |
@@ -111,8 +111,6 @@ internal class SnapshotHandler : Handler
|
|||||||
var hasAuthority = _playerCache.Local.Id == player.Id;
|
var hasAuthority = _playerCache.Local.Id == player.Id;
|
||||||
var entity = _entityCache.TryGetEntity(0, entityType, staticId, entityId, hasAuthority, out _);
|
var entity = _entityCache.TryGetEntity(0, entityType, staticId, entityId, hasAuthority, out _);
|
||||||
|
|
||||||
_entityListener.OnEntityCreated(entity);
|
|
||||||
|
|
||||||
entity.Read(buffer);
|
entity.Read(buffer);
|
||||||
entity.Attach(_client, entityId, entityType, hasAuthority, player);
|
entity.Attach(_client, entityId, entityType, hasAuthority, player);
|
||||||
}
|
}
|
||||||
@@ -120,7 +118,6 @@ internal class SnapshotHandler : Handler
|
|||||||
if (_client.Status == RagonStatus.LOBBY)
|
if (_client.Status == RagonStatus.LOBBY)
|
||||||
{
|
{
|
||||||
_client.SetStatus(RagonStatus.ROOM);
|
_client.SetStatus(RagonStatus.ROOM);
|
||||||
|
|
||||||
_listenerList.OnJoined();
|
_listenerList.OnJoined();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ public class RagonEntity : IRagonEntity
|
|||||||
if (Authority == RagonAuthority.OwnerOnly &&
|
if (Authority == RagonAuthority.OwnerOnly &&
|
||||||
Owner.Connection.Id != caller.Connection.Id)
|
Owner.Connection.Id != caller.Connection.Id)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Player have not enough authority for event with Id {evnt.EventCode}");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ public class RagonEvent
|
|||||||
|
|
||||||
public void Read(RagonBuffer buffer)
|
public void Read(RagonBuffer buffer)
|
||||||
{
|
{
|
||||||
buffer.ReadArray(_data, buffer.Capacity);
|
_size = buffer.Capacity;
|
||||||
|
buffer.ReadArray(_data, _size);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write(RagonBuffer buffer)
|
public void Write(RagonBuffer buffer)
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public sealed class SceneLoadedOperation : IRagonOperation
|
|||||||
Authority = eventAuthority,
|
Authority = eventAuthority,
|
||||||
AttachId = 0,
|
AttachId = 0,
|
||||||
StaticId = staticId,
|
StaticId = staticId,
|
||||||
|
BufferedEvents = context.Configuration.LimitBufferedEvents,
|
||||||
};
|
};
|
||||||
|
|
||||||
var entity = new RagonEntity(entityParameters);
|
var entity = new RagonEntity(entityParameters);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public struct RagonServerConfiguration
|
|||||||
public Dictionary<string, string> WebHooks;
|
public Dictionary<string, string> WebHooks;
|
||||||
|
|
||||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
private static readonly string ServerVersion = "1.2.0-rc";
|
private static readonly string ServerVersion = "1.2.9-rc";
|
||||||
private static Dictionary<string, ServerType> _serverTypes = new Dictionary<string, ServerType>()
|
private static Dictionary<string, ServerType> _serverTypes = new Dictionary<string, ServerType>()
|
||||||
{
|
{
|
||||||
{"enet", Server.ServerType.ENET},
|
{"enet", Server.ServerType.ENET},
|
||||||
|
|||||||
Reference in New Issue
Block a user