Holy crap auth works (#2099)
* Holy crap auth works * Fix some usages of UserID instead of UserName * Refactor preferences. They be non-async now. Also faster. * Rename DbContext. * Guest username assignment. * Fix saving of profiles. * Don't store data for guests. * Fix generating invalid random colors. * Don't allow dumb garbage for char preferences. * Bans. * Lol forgot to fill out the command description. * Connection log. * Rename all the tables and columns to be snake_case. * Re-do migrations. * Fixing tests and warnings. * Update submodule
This commit is contained in:
committed by
GitHub
parent
8a33e0a9bd
commit
66c8a68891
@@ -193,23 +193,23 @@ namespace Content.Shared
|
||||
/// <summary>
|
||||
/// The Status of the Player in the lobby (ready, observer, ...)
|
||||
/// </summary>
|
||||
public Dictionary<NetSessionId, PlayerStatus> PlayerStatus { get; set; }
|
||||
public Dictionary<NetUserId, PlayerStatus> PlayerStatus { get; set; }
|
||||
|
||||
public override void ReadFromBuffer(NetIncomingMessage buffer)
|
||||
{
|
||||
PlayerStatus = new Dictionary<NetSessionId, PlayerStatus>();
|
||||
PlayerStatus = new Dictionary<NetUserId, PlayerStatus>();
|
||||
var length = buffer.ReadInt32();
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
var serializer = IoCManager.Resolve<IRobustSerializer>();
|
||||
var byteLength = buffer.ReadVariableInt32();
|
||||
NetSessionId sessionID;
|
||||
NetUserId userId;
|
||||
using (var stream = buffer.ReadAsStream(byteLength))
|
||||
{
|
||||
serializer.DeserializeDirect(stream, out sessionID);
|
||||
serializer.DeserializeDirect(stream, out userId);
|
||||
}
|
||||
var status = (PlayerStatus)buffer.ReadByte();
|
||||
PlayerStatus.Add(sessionID, status);
|
||||
PlayerStatus.Add(userId, status);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user