mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Fix Starting Game in Private Lobby
This commit is contained in:
1 parent
286d3bd184
commit
636a449318
3 files changed
+4
-4
No files matched your search
@@ -233,11 +233,11 @@ internal class NetworkManager
|
||||
|
||||
if (Enum.IsDefined(typeof(RpcCalls), rpcCall))
|
||||
{
|
||||
innerNetObject.HandleRpc(rpcCall, reader);
|
||||
innerNetObject?.HandleRpc(rpcCall, reader);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (innerNetObject is PlayerControl player)
|
||||
if (innerNetObject is PlayerControl player && player != null)
|
||||
{
|
||||
RPC.HandleCustomRPC(player, rpcCall, reader);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ internal static class GameState
|
||||
internal static bool IsShip => ShipStatus.Instance != null;
|
||||
internal static bool IsHost => AmongUsClient.Instance != null && AmongUsClient.Instance.AmHost;
|
||||
internal static bool IsPrivateOnlyLobby => (BAUPlugin.PrivateOnlyLobby.Value || AmongUsClient.Instance.AmLocalHost) && IsHost;
|
||||
internal static bool IsBetterHostLobby => PlayerControl.LocalPlayer.IsHost() || BAUPlugin.AllPlayerControls.Any(pc => pc.IsHost() && pc.BetterData().IsBetterUser && pc.BetterData().IsVerifiedBetterUser);
|
||||
internal static bool IsBetterHostLobby => PlayerControl.LocalPlayer?.IsHost() == true || BAUPlugin.AllPlayerControls.Any(pc => pc?.BetterData() != null && pc.IsHost() && pc.BetterData().IsBetterUser && pc.BetterData().IsVerifiedBetterUser);
|
||||
internal static bool IsCanMove => PlayerControl.LocalPlayer?.CanMove is true;
|
||||
internal static bool IsDead => PlayerControl.LocalPlayer?.Data?.IsDead is true;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ internal static class PrivateLobbyPatch
|
||||
var button = __instance.HostPrivateButton.GetComponent<PassiveButton>();
|
||||
if (button != null)
|
||||
{
|
||||
button.DestroyMono();
|
||||
button.enabled = false;
|
||||
|
||||
var sprite = __instance.HostPrivateButton.transform.Find("Inactive").GetComponent<SpriteRenderer>();
|
||||
if (sprite != null)
|
||||
|
||||
Reference in new issue
Block a user