More fixes

This commit is contained in:
Bandwidth
2026-04-27 22:36:06 +02:00
parent 53a10f9196
commit 19242d51ae
2 changed files with 30 additions and 0 deletions

View File

@@ -423,6 +423,16 @@ public class CreateLobby : Message
public double PlayAreaRadius { get; set; } = 500; // metry
public int ImpostorCount { get; set; } = 1;
public int TaskCount { get; set; } = 5;
/// <summary>
/// Optional. If present, server uses this as the host's display name
/// (and updates the connection's stored DisplayName so subsequent
/// operations also use it). Client sends the live value from the
/// nickname input field, which avoids the ClientHello-time staleness:
/// the original ClientHello fired at TCP connection (long before the
/// user typed anything), so the server would otherwise see the prefab
/// default ("Hrac") for users who type their name and immediately host.
/// </summary>
public string? DisplayName { get; set; }
}
public class CreateLobbyResponse : Message
@@ -440,6 +450,12 @@ public class JoinLobby : Message
public override string Type => "JoinLobby";
public required string JoinCode { get; set; }
public string? Password { get; set; }
/// <summary>
/// Optional. If present, server uses this as the joiner's display name
/// instead of the ClientHello-time value. See CreateLobby.DisplayName
/// for the rationale (input-field commit race vs handshake-time name).
/// </summary>
public string? DisplayName { get; set; }
}
public class JoinLobbyResponse : Message