Skip to content

Commit 0446755

Browse files
author
batram
committed
Fix local 4 player limit on join lobby
UnityMatchmaker.onLobbyJoined locally checks if there are 4 players in the lobby on join. fix #7
1 parent 122aaee commit 0446755

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

MorePlayersMod.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
using UnityEngine.Networking;
1010
using UnityEngine.Networking.Match;
1111

12-
[assembly: AssemblyVersion("0.9.0.0")]
13-
[assembly: AssemblyInformationalVersion("0.9.0.0")]
12+
[assembly: AssemblyVersion("0.9.0.1")]
13+
[assembly: AssemblyInformationalVersion("0.9.0.1")]
1414

1515
namespace MorePlayers
1616
{
17-
[BepInPlugin("notfood.MorePlayers", "EvenMorePlayers", "0.9.0.0")]
17+
[BepInPlugin("notfood.MorePlayers", "EvenMorePlayers", "0.9.0.1")]
1818
public class MorePlayersMod : BaseUnityPlugin
1919
{
2020
public const int newPlayerLimit = 100;
2121

2222
public static bool fullDebug = true;
2323
public static string og_version;
24-
public static string mod_version = "0.9.0.0";
24+
public static string mod_version = "0.9.0.1";
2525

2626
void Awake()
2727
{
@@ -65,7 +65,7 @@ static IEnumerable<MethodBase> TargetMethods()
6565
yield return AccessTools.Method(typeof(TurnIndicator), nameof(TurnIndicator.SetPlayerCount));
6666
yield return AccessTools.Method(typeof(UnityMatchmaker), nameof(UnityMatchmaker.CheckHostConnectivity));
6767
//yield return AccessTools.Method(typeof(UnityMatchmaker), nameof(UnityMatchmaker.CreateUnityMatch));
68-
yield return AccessTools.Method(typeof(VersusControl), "get_playersLeftToPlace");
68+
yield return AccessTools.Method(typeof(VersusControl), "get_playersLeftToPlace");
6969
}
7070

7171
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> e)
@@ -115,6 +115,7 @@ static class SwitchSecond4ForMaxNumPatch
115115
static IEnumerable<MethodBase> TargetMethods()
116116
{
117117
yield return AccessTools.Method(typeof(LobbySkillTracker), nameof(LobbySkillTracker.UpdateLobbyInfo));
118+
yield return AccessTools.Method(typeof(UnityMatchmaker), nameof(UnityMatchmaker.onLobbyJoined));
118119
}
119120

120121
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> e)

0 commit comments

Comments
 (0)