Skip to content

Commit beea96f

Browse files
committed
Revert "Added first implementation."
This reverts commit 83c3f3b.
1 parent 280922a commit beea96f

1 file changed

Lines changed: 11 additions & 28 deletions

File tree

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,13 +1171,9 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
11711171
{
11721172
if (LANbuttonPushed)
11731173
break;
1174-
1175-
LANGameInfo* myGame = TheLAN->GetMyGame();
1176-
if (myGame->isGameInProgress())
1177-
return MSG_IGNORED;
1178-
11791174
GameWindow *control = (GameWindow *)mData1;
11801175
Int controlID = control->winGetWindowId();
1176+
LANGameInfo *myGame = TheLAN->GetMyGame();
11811177

11821178
if ( controlID == comboBoxStartingCashID )
11831179
{
@@ -1243,11 +1239,6 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
12431239
{
12441240
if (LANbuttonPushed)
12451241
break;
1246-
1247-
LANGameInfo* myGame = TheLAN->GetMyGame();
1248-
if (myGame->isGameInProgress())
1249-
return MSG_IGNORED;
1250-
12511242
GameWindow *control = (GameWindow *)mData1;
12521243
Int controlID = control->winGetWindowId();
12531244

@@ -1298,7 +1289,7 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
12981289
TheLAN->RequestAccept();
12991290

13001291
// Disable the accept button
1301-
EnableAcceptControls(TRUE, myGame, comboBoxPlayer, comboBoxColor, comboBoxPlayerTemplate,
1292+
EnableAcceptControls(TRUE, TheLAN->GetMyGame(), comboBoxPlayer, comboBoxColor, comboBoxPlayerTemplate,
13021293
comboBoxTeam, buttonAccept, buttonStart, buttonMapStartPosition);
13031294

13041295
}
@@ -1313,10 +1304,11 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
13131304
{
13141305
if (controlID == buttonMapStartPositionID[i])
13151306
{
1307+
LANGameInfo *game = TheLAN->GetMyGame();
13161308
Int playerIdxInPos = -1;
13171309
for (Int j=0; j<MAX_SLOTS; ++j)
13181310
{
1319-
LANGameSlot *slot = myGame->getLANSlot(j);
1311+
LANGameSlot *slot = game->getLANSlot(j);
13201312
if (slot && slot->getStartPos() == i)
13211313
{
13221314
playerIdxInPos = j;
@@ -1325,8 +1317,8 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
13251317
}
13261318
if (playerIdxInPos >= 0)
13271319
{
1328-
LANGameSlot *slot = myGame->getLANSlot(playerIdxInPos);
1329-
if (playerIdxInPos == myGame->getLocalSlotNum() || (myGame->amIHost() && slot && slot->isAI()))
1320+
LANGameSlot *slot = game->getLANSlot(playerIdxInPos);
1321+
if (playerIdxInPos == game->getLocalSlotNum() || (game->amIHost() && slot && slot->isAI()))
13301322
{
13311323
// it's one of my type. Try to change it.
13321324
Int nextPlayer = getNextSelectablePlayer(playerIdxInPos+1);
@@ -1342,7 +1334,7 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
13421334
// nobody in the slot - put us in
13431335
Int nextPlayer = getNextSelectablePlayer(0);
13441336
if (nextPlayer < 0)
1345-
nextPlayer = getFirstSelectablePlayer(myGame);
1337+
nextPlayer = getFirstSelectablePlayer(game);
13461338
handleStartPositionSelection(nextPlayer, i);
13471339
}
13481340
}
@@ -1357,21 +1349,17 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
13571349
if (LANbuttonPushed)
13581350
break;
13591351

1360-
LANGameInfo* myGame = TheLAN->GetMyGame();
1361-
if (myGame->isGameInProgress())
1362-
return MSG_IGNORED;
1363-
13641352
GameWindow *control = (GameWindow *)mData1;
13651353
Int controlID = control->winGetWindowId();
1366-
13671354
for (Int i = 0; i < MAX_SLOTS; i++)
13681355
{
13691356
if (controlID == buttonMapStartPositionID[i])
13701357
{
1358+
LANGameInfo *game = TheLAN->GetMyGame();
13711359
Int playerIdxInPos = -1;
13721360
for (Int j=0; j<MAX_SLOTS; ++j)
13731361
{
1374-
LANGameSlot *slot = myGame->getLANSlot(j);
1362+
LANGameSlot *slot = game->getLANSlot(j);
13751363
if (slot && slot->getStartPos() == i)
13761364
{
13771365
playerIdxInPos = j;
@@ -1380,8 +1368,8 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
13801368
}
13811369
if (playerIdxInPos >= 0)
13821370
{
1383-
LANGameSlot *slot = myGame->getLANSlot(playerIdxInPos);
1384-
if (playerIdxInPos == myGame->getLocalSlotNum() || (myGame->amIHost() && slot && slot->isAI()))
1371+
LANGameSlot *slot = game->getLANSlot(playerIdxInPos);
1372+
if (playerIdxInPos == game->getLocalSlotNum() || (game->amIHost() && slot && slot->isAI()))
13851373
{
13861374
// it's one of my type. Remove it.
13871375
handleStartPositionSelection(playerIdxInPos, -1);
@@ -1396,11 +1384,6 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
13961384
{
13971385
if (LANbuttonPushed)
13981386
break;
1399-
1400-
LANGameInfo* myGame = TheLAN->GetMyGame();
1401-
if (myGame->isGameInProgress())
1402-
return MSG_IGNORED;
1403-
14041387
GameWindow *control = (GameWindow *)mData1;
14051388
Int controlID = control->winGetWindowId();
14061389

0 commit comments

Comments
 (0)