fix: features not working with >4 players
very unoptimal but that's in a corroutine ig that's fine
This commit is contained in:
@@ -165,9 +165,7 @@ namespace DevourClient.Hacks
|
||||
}
|
||||
|
||||
public static void CreateCustomizedLobby(int lobbySize = 4, bool isPrivate = false, Il2CppUdpKit.Platform.Photon.PhotonRegion.Regions __region = Il2CppUdpKit.Platform.Photon.PhotonRegion.Regions.BEST_REGION)
|
||||
{
|
||||
Entities.MAX_PLAYERS = lobbySize; //max players in the lobby
|
||||
|
||||
{
|
||||
Il2CppHorror.Menu _menu = UnityEngine.Object.FindObjectOfType<Il2CppHorror.Menu>();
|
||||
|
||||
CanvasGroup _loadingCanvasGroup = _menu.loadingCanvasGroup;
|
||||
|
||||
@@ -147,8 +147,7 @@ namespace DevourClient.Helpers
|
||||
public static int MAX_PLAYERS = 4; //will change by calling CreateCustomizedLobby
|
||||
|
||||
public static BasePlayer LocalPlayer_ = new BasePlayer();
|
||||
public static BasePlayer[] Players = new BasePlayer[MAX_PLAYERS]; //i hope this doesn't break
|
||||
//public static GameObject[] Players = default!;
|
||||
public static BasePlayer[] Players = default!;
|
||||
public static Il2Cpp.GoatBehaviour[] GoatsAndRats = default!;
|
||||
public static Il2Cpp.SurvivalInteractable[] SurvivalInteractables = default!;
|
||||
public static Il2Cpp.KeyBehaviour[] Keys = default!;
|
||||
@@ -184,6 +183,7 @@ namespace DevourClient.Helpers
|
||||
for (;;)
|
||||
{
|
||||
GameObject[] players = GameObject.FindGameObjectsWithTag("Player");
|
||||
Players = new BasePlayer[players.Length];
|
||||
|
||||
int i = 0;
|
||||
foreach (GameObject p in players)
|
||||
|
||||
Reference in New Issue
Block a user