Skip to content

Commit c84c94d

Browse files
committed
Issue 333
1 parent 581b242 commit c84c94d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gui/tabs/host_tab.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ namespace HostTab {
200200
const int32_t currentMaxPlayers = options.GetMaxPlayers();
201201
const int32_t minPlayers = 4, maxAllowedPlayers = static_cast<int32_t>(Game::MAX_PLAYERS);
202202
int32_t newMaxPlayers = std::clamp(currentMaxPlayers, minPlayers, maxAllowedPlayers);
203-
204-
if (!State.SafeMode && IsInLobby() && ImGui::InputInt("Max Players", &newMaxPlayers) && newMaxPlayers != currentMaxPlayers) {
203+
#define LocalInLobby (((*Game::pAmongUsClient)->fields._.NetworkMode == NetworkModes__Enum::LocalGame) && ((*Game::pAmongUsClient)->fields._.GameState == InnerNetClient_GameStates__Enum::Joined))
204+
if ((LocalInLobby || !State.SafeMode) && IsInLobby() && ImGui::InputInt("Max Players", &newMaxPlayers) && newMaxPlayers != currentMaxPlayers) {
205205
if (newMaxPlayers >= minPlayers && newMaxPlayers <= maxAllowedPlayers) {
206206
if (newMaxPlayers == 4 || newMaxPlayers == 255) {
207207
ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "Number of players must be between %d and %d", minPlayers, maxAllowedPlayers);

0 commit comments

Comments
 (0)