fixed: additional data missed
This commit is contained in:
@@ -25,7 +25,7 @@ public class AuthorizationManager : IAuthorizationManager
|
||||
_playersByPeers = new Dictionary<uint, Player>();
|
||||
}
|
||||
|
||||
public void OnAuthorization(uint peerId, string key, string name)
|
||||
public void OnAuthorization(uint peerId, string key, string name, ReadOnlySpan<byte> additionalData)
|
||||
{
|
||||
if (_playersByPeers.ContainsKey(peerId))
|
||||
{
|
||||
@@ -35,7 +35,7 @@ public class AuthorizationManager : IAuthorizationManager
|
||||
|
||||
var dispatcher = _gameThread.ThreadDispatcher;
|
||||
|
||||
_provider.OnAuthorizationRequest(key, name, Array.Empty<byte>(),
|
||||
_provider.OnAuthorizationRequest(key, name, additionalData.ToArray(),
|
||||
(playerId, playerName) => { dispatcher.Dispatch(() => Accepted(peerId, playerId, playerName)); },
|
||||
(errorCode) => { dispatcher.Dispatch(() => Rejected(peerId, errorCode)); });
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace Ragon.Core
|
||||
public class Player
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public uint PeerId { get; set; }
|
||||
public string PlayerName { get; set; }
|
||||
public uint PeerId { get; set; }
|
||||
public bool IsLoaded { get; set; }
|
||||
|
||||
public List<Entity> Entities;
|
||||
|
||||
Reference in New Issue
Block a user