mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
zoom update
This commit is contained in:
1 parent
98eea550cf
commit
5055981542
2 files changed
+5
-3
No files matched your search
@@ -151,6 +151,8 @@ static class ExtendedPlayerControl
|
||||
return "#8cffff";
|
||||
}
|
||||
}
|
||||
// Check if player is role type
|
||||
public static bool Is(this PlayerControl player, RoleTypes role) => player?.Data?.RoleType == role;
|
||||
// Check if player is on imposter team
|
||||
public static bool IsImpostorTeam(this PlayerControl player) => player?.Data != null && (player.Data.RoleType is RoleTypes.Impostor or RoleTypes.ImpostorGhost or RoleTypes.Shapeshifter or RoleTypes.Phantom);
|
||||
// Check if player is a imposter teammate
|
||||
|
||||
+3
-3
@@ -1,4 +1,5 @@
|
||||
using HarmonyLib;
|
||||
using AmongUs.GameOptions;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
@@ -11,8 +12,7 @@ public static class Zoom
|
||||
|
||||
public static void Postfix()
|
||||
{
|
||||
if ((GameStates.IsShip && !GameStates.IsMeeting && GameStates.IsCanMove && PlayerControl.LocalPlayer.Data.IsDead) ||
|
||||
(GameStates.IsLobby && GameStates.IsCanMove))
|
||||
if (GameStates.IsCanMove && !PlayerControl.LocalPlayer.Is(RoleTypes.GuardianAngel) && (!GameStates.IsInGamePlay || !PlayerControl.LocalPlayer.IsAlive()))
|
||||
{
|
||||
if (Camera.main.orthographicSize > 3.0f)
|
||||
resetButtons = true;
|
||||
|
||||
Reference in new issue
Block a user