Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/GameEngine/Include/GameNetwork/LANGameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ class LANGameInfo : public GameInfo

void LANDisplayGameList( GameWindow *gameListbox, LANGameInfo *gameList ); ///< Displays the list of games in a listbox, preserving selections
void LANEnableStartButton(Bool enabled);
void LANDisableButtons();

void LANDisplaySlotList(); ///< Displays the slot list according to TheLANGameInfo
void LANDisplayGameOptions(); ///< Displays the game options according to TheLANGameInfo
Expand Down
7 changes: 7 additions & 0 deletions Core/GameEngine/Source/GameNetwork/LANAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,13 @@ void LANAPI::update()
// m_gameStartTime is when the next message goes out
// m_gameStartSeconds is how many seconds remain in the message

if (m_gameStartSeconds == 1)
{
// TheSuperHackers @bugfix Disable LAN menu buttons early to avoid a rare crash
// that may happen when using the buttons at the last moment (after they're deinitialized).
LANDisableButtons();
}

RequestGameStartTimer( m_gameStartSeconds );
}
else if (m_gameStartTime && m_gameStartTime <= now)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,25 @@ void LANEnableStartButton(Bool enabled)
buttonSelectMap->winEnable(enabled);
}

void LANDisableButtons()
{
buttonStart->winEnable(false);
buttonBack->winEnable(false);
buttonSelectMap->winEnable(false);
checkboxLimitSuperweapons->winEnable(false);
comboBoxStartingCash->winEnable(false);

for (Int i = 0; i < MAX_SLOTS; ++i)
{
comboBoxPlayer[i]->winEnable(false);
comboBoxColor[i]->winEnable(false);
comboBoxPlayerTemplate[i]->winEnable(false);
comboBoxTeam[i]->winEnable(false);
buttonAccept[i]->winEnable(false);
buttonMapStartPosition[i]->winEnable(false);
}
}
Comment thread
Caball009 marked this conversation as resolved.

static void handleColorSelection(int index)
{
GameWindow *combo = comboBoxColor[index];
Expand Down
Loading