Merge branch 'dev' into vendor-compatibility

This commit is contained in:
JohnCorby 2022-01-24 18:05:37 -08:00
commit 9244408236
2 changed files with 4 additions and 4 deletions

View File

@ -318,6 +318,8 @@ namespace QSB.Menus
SetButtonActive(HostButton, false); SetButtonActive(HostButton, false);
SetButtonActive(QuitButton, false); SetButtonActive(QuitButton, false);
QSBNetworkManager.singleton.StartHost();
var text = QSBCore.IsHost var text = QSBCore.IsHost
? StopHostingString ? StopHostingString
: DisconnectString; : DisconnectString;
@ -340,8 +342,6 @@ namespace QSB.Menus
, "YES" , "YES"
, "NO"); , "NO");
} }
QSBNetworkManager.singleton.StartHost();
} }
private void Connect() private void Connect()

View File

@ -33,9 +33,9 @@ namespace QSB.Utility
public static uint GetPlayerId(this NetworkConnection conn) public static uint GetPlayerId(this NetworkConnection conn)
{ {
if (conn == null) if (!conn.identity)
{ {
DebugLog.ToConsole("Warning - GetPlayerId with null NetworkConnection", MessageType.Warning); DebugLog.ToConsole($"Error - GetPlayerId on {conn.address} has no identity", MessageType.Error);
return uint.MaxValue; return uint.MaxValue;
} }