Added better GPS handling, Improved test mode, Fixed naming of players not being broadcast until a new HelloClient, Fixed lobby restarts, Fixed task handling

This commit is contained in:
Bandwidth
2026-04-27 23:18:13 +02:00
parent d886f97e14
commit 207f997254
8 changed files with 1175 additions and 77 deletions

View File

@@ -533,6 +533,11 @@ public class GameClient : IDisposable
public void CreateLobby(Position? center = null, int impostorCount = 1, int taskCount = 5, string? password = null, double playAreaRadius = 500, GameSettingsOverrides? settings = null)
{
// DisplayName is sent on every CreateLobby/JoinLobby so the server
// picks up the live nickname (typed into the input field after the
// ClientHello handshake fired). Without this the server uses the
// ClientHello-time name, which is the GameManager prefab default
// for any user who immediately created/joined a lobby.
Send(new CreateLobby
{
PlayAreaCenter = center,
@@ -540,16 +545,18 @@ public class GameClient : IDisposable
ImpostorCount = impostorCount,
TaskCount = taskCount,
Password = password,
Settings = settings
Settings = settings,
DisplayName = DisplayName
});
}
public void JoinLobby(string joinCode, string? password = null)
{
Send(new JoinLobby
{
JoinCode = joinCode.ToUpperInvariant(),
Password = password
Password = password,
DisplayName = DisplayName
});
}