dlgmplangamelist.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Combat *
  23. * *
  24. * $Archive:: /Commando/Code/commando/dlgmplangamelist.cpp $*
  25. * *
  26. * Author:: Patrick Smith *
  27. * *
  28. * $Modtime:: 3/28/02 4:31p $*
  29. * *
  30. * $Revision:: 41 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #include "dlgmplangamelist.h"
  36. #include "win.h"
  37. #include "listctrl.h"
  38. #include "gamedata.h"
  39. #include "gamechannel.h"
  40. #include "gamechanlist.h"
  41. #include "gameinitmgr.h"
  42. #include "wolgmode.h"
  43. #include "dialogmgr.h"
  44. #include "cnetwork.h"
  45. #include "ww3d.h"
  46. #include "dialogresource.h"
  47. #include "renegadedialogmgr.h"
  48. #include "translatedb.h"
  49. #include "string_ids.h"
  50. #include "dialogcontrol.h"
  51. #include "specialbuilds.h"
  52. #include "editctrl.h"
  53. #include "dlgpasswordprompt.h"
  54. #include "registry.h"
  55. #include "_globals.h"
  56. #include "dlgmplanhostoptions.h"
  57. bool MPLanGameListMenuClass::UpdateNickname = false;
  58. ////////////////////////////////////////////////////////////////
  59. // Local constants
  60. ////////////////////////////////////////////////////////////////
  61. static enum
  62. {
  63. COL_ICON = 0,
  64. COL_HOST_NAME,
  65. COL_GAME_NAME,
  66. COL_GAME_MAP,
  67. COL_PLAYERS,
  68. COL_MAX
  69. };
  70. ////////////////////////////////////////////////////////////////
  71. // Static member initialization
  72. ////////////////////////////////////////////////////////////////
  73. MPLanGameListMenuClass * MPLanGameListMenuClass::_TheInstance = NULL;
  74. ////////////////////////////////////////////////////////////////
  75. //
  76. // MPLanGameListMenuClass
  77. //
  78. ////////////////////////////////////////////////////////////////
  79. MPLanGameListMenuClass::MPLanGameListMenuClass (void) :
  80. UpdateTimer (0),
  81. MenuDialogClass (IDD_MP_LAN_GAME_LIST)
  82. {
  83. WWDEBUG_SAY(("MPLanGameListMenu instantiated\n"));
  84. }
  85. MPLanGameListMenuClass::~MPLanGameListMenuClass()
  86. {
  87. WWDEBUG_SAY(("MPLanGameListMenu destroyed\n"));
  88. }
  89. ////////////////////////////////////////////////////////////////
  90. //
  91. // On_Init_Dialog
  92. //
  93. ////////////////////////////////////////////////////////////////
  94. void
  95. MPLanGameListMenuClass::On_Init_Dialog (void)
  96. {
  97. /*
  98. #ifdef BETACLIENT
  99. Get_Dlg_Item(IDC_MENU_MP_LAN_HOST_BUTTON)->Enable(false);
  100. #endif // BETACLIENT
  101. */
  102. #ifdef FREEDEDICATEDSERVER
  103. Get_Dlg_Item(IDC_JOIN_GAME_BUTTON)->Enable(false);
  104. #endif // FREEDEDICATEDSERVER
  105. //
  106. // Get a pointer to the list control
  107. //
  108. ListCtrlClass *list_ctrl = (ListCtrlClass *)Get_Dlg_Item (IDC_GAME_LIST_CTRL);
  109. if (list_ctrl != NULL) {
  110. WideStringClass col_name;
  111. //
  112. // Configure the columns
  113. //
  114. col_name = TRANSLATE (IDS_MP_GAME_LIST_HEADER_ICON);
  115. list_ctrl->Add_Column (col_name, 0.1F, Vector3 (1, 1, 1));
  116. col_name = TRANSLATE(IDS_MP_GAME_LIST_HEADER_HOST_NAME);
  117. list_ctrl->Add_Column (col_name, 0.175F, Vector3 (1, 1, 1));
  118. col_name = TRANSLATE (IDS_MP_GAME_LIST_HEADER_GAME_NAME);
  119. list_ctrl->Add_Column (col_name, 0.325F, Vector3 (1, 1, 1));
  120. col_name = TRANSLATE (IDS_MP_GAME_LIST_HEADER_GAME_MAP);
  121. list_ctrl->Add_Column (col_name, 0.2F, Vector3 (1, 1, 1));
  122. col_name = TRANSLATE (IDS_MP_GAME_LIST_HEADER_PLAYERS);
  123. list_ctrl->Add_Column (col_name, 0.1F, Vector3 (1, 1, 1));
  124. col_name = TRANSLATE (IDS_MP_GAME_LIST_HEADER_PING);
  125. list_ctrl->Add_Column (col_name, 0.1F, Vector3 (1, 1, 1));
  126. //
  127. // Refresh the game list in one second
  128. //
  129. UpdateTimer = 500;
  130. }
  131. //
  132. // Put the nickname into the nickname edit control
  133. //
  134. EditCtrlClass* nameEdit = (EditCtrlClass*)Get_Dlg_Item(IDC_NICKNAME_EDIT);
  135. assert(nameEdit != NULL);
  136. if (nameEdit) {
  137. //nameEdit->Set_Text_Limit(32);
  138. nameEdit->Set_Text_Limit(9);
  139. nameEdit->Set_Text(cNetInterface::Get_Nickname());
  140. bool enable = (nameEdit->Get_Text_Length() > 0);
  141. Enable_Dlg_Item(IDC_JOIN_GAME_BUTTON, enable);
  142. Enable_Dlg_Item(IDC_MENU_MP_LAN_HOST_BUTTON, enable);
  143. }
  144. cGameChannelList::Remove_All();
  145. MenuDialogClass::On_Init_Dialog ();
  146. return ;
  147. }
  148. ////////////////////////////////////////////////////////////////
  149. //
  150. // On_Destroy
  151. //
  152. ////////////////////////////////////////////////////////////////
  153. void
  154. MPLanGameListMenuClass::On_Destroy (void)
  155. {
  156. //
  157. // Set the new nickname
  158. //
  159. WideStringClass nickname = Get_Dlg_Item_Text (IDC_NICKNAME_EDIT);
  160. cNetInterface::Set_Nickname (nickname);
  161. return ;
  162. }
  163. ////////////////////////////////////////////////////////////////
  164. //
  165. // On_Command
  166. //
  167. ////////////////////////////////////////////////////////////////
  168. void
  169. MPLanGameListMenuClass::On_Command (int ctrl_id, int message_id, DWORD param)
  170. {
  171. switch (ctrl_id) {
  172. case IDC_REFRESH_GAME_LIST:
  173. Update_Game_List ();
  174. break;
  175. case IDC_JOIN_GAME_BUTTON:
  176. Join_Game ();
  177. break;
  178. case IDC_MENU_MP_LAN_HOST_BUTTON:
  179. {
  180. //
  181. // Set the new nickname
  182. //
  183. WideStringClass nickname = Get_Dlg_Item_Text (IDC_NICKNAME_EDIT);
  184. cNetInterface::Set_Nickname (nickname);
  185. /*
  186. //
  187. // Cache this value, don't know if we need to or not anymore...
  188. //
  189. RegistryClass registry (APPLICATION_SUB_KEY_NAME_WOLSETTINGS);
  190. if (registry.Is_Valid ()) {
  191. registry.Set_Int (REG_VALUE_LAST_GAME_TYPE, 0);
  192. }
  193. */
  194. //
  195. // Create the new game data
  196. //
  197. if ( PTheGameData != NULL ) {
  198. delete PTheGameData;
  199. PTheGameData = NULL;
  200. }
  201. PTheGameData = cGameData::Create_Game_Of_Type (cGameData::GAME_TYPE_CNC);
  202. WWASSERT(PTheGameData != NULL);
  203. // LAN games are NEVER quickmatch
  204. The_Game()->Set_QuickMatch_Server(false);
  205. The_Game()->Load_From_Server_Config ();
  206. //
  207. // Go to the host game options menu
  208. //
  209. START_DIALOG (MPLanHostOptionsMenuClass);
  210. break;
  211. }
  212. }
  213. MenuDialogClass::On_Command (ctrl_id, message_id, param);
  214. return ;
  215. }
  216. ////////////////////////////////////////////////////////////////
  217. //
  218. // On_Frame_Update
  219. //
  220. ////////////////////////////////////////////////////////////////
  221. void
  222. MPLanGameListMenuClass::On_Frame_Update (void)
  223. {
  224. //
  225. // Is it time to update the list?
  226. //
  227. UpdateTimer -= WW3D::Get_Frame_Time ();
  228. if (UpdateTimer <= 0) {
  229. //
  230. // Update the list and reset the timer
  231. //
  232. Update_Game_List ();
  233. if (GameInitMgrClass::Is_WOL_Initialized ()) {
  234. UpdateTimer = 20000;
  235. } else {
  236. UpdateTimer = 1000;
  237. }
  238. }
  239. if (UpdateNickname) {
  240. EditCtrlClass * nameEdit = (EditCtrlClass*)Get_Dlg_Item(IDC_NICKNAME_EDIT);
  241. WWASSERT(nameEdit != NULL);
  242. nameEdit->Set_Text(cNetInterface::Get_Nickname());
  243. UpdateNickname = false;
  244. }
  245. MenuDialogClass::On_Frame_Update ();
  246. return ;
  247. }
  248. bool MPLanGameListMenuClass::On_Key_Down(uint32 key_id, uint32 key_data)
  249. {
  250. if (VK_F5 == key_id) {
  251. Update_Game_List();
  252. return true;
  253. }
  254. return MenuDialogClass::On_Key_Down(key_id, key_data);
  255. }
  256. ////////////////////////////////////////////////////////////////
  257. //
  258. // Update_Game_List
  259. //
  260. ////////////////////////////////////////////////////////////////
  261. void
  262. MPLanGameListMenuClass::Update_Game_List (void)
  263. {
  264. ListCtrlClass *list_ctrl = (ListCtrlClass *)Get_Dlg_Item (IDC_GAME_LIST_CTRL);
  265. if (list_ctrl == NULL) {
  266. return ;
  267. }
  268. //
  269. // Remember the owner of the selected entry so we can select it again as necessary
  270. //
  271. WideStringClass selected_owner_name;
  272. int curr_sel = list_ctrl->Get_Curr_Sel ();
  273. if (curr_sel != -1) {
  274. cGameChannel *channel = (cGameChannel *)list_ctrl->Get_Entry_Data (curr_sel, 0);
  275. if (channel != NULL) {
  276. selected_owner_name = channel->Get_Game_Data ()->Get_Owner ();
  277. }
  278. }
  279. //
  280. // Start fresh
  281. //
  282. list_ctrl->Delete_All_Entries ();
  283. //
  284. // Build the game list
  285. //
  286. int index = 0;
  287. bool found_selected = false;
  288. SLNode<cGameChannel> *objnode = NULL;
  289. for (objnode = cGameChannelList::Get_Chan_List ()->Head(); objnode; objnode = objnode->Next ()) {
  290. //
  291. // Get a pointer to the channel for this game
  292. //
  293. cGameChannel *channel = objnode->Data ();
  294. WWASSERT (channel != NULL);
  295. //
  296. // Insert the entry
  297. //
  298. int item_index = list_ctrl->Insert_Entry (index ++, L"");
  299. if (item_index >= 0) {
  300. //
  301. // Get the owner and game name
  302. //
  303. WideStringClass wide_owner_name;
  304. WideStringClass wide_game_name;
  305. WideStringClass wide_map_name;
  306. wide_owner_name = channel->Get_Game_Data ()->Get_Owner();
  307. //wide_game_name = channel->Get_Game_Data ()->Get_Game_Name ();
  308. wide_game_name = channel->Get_Game_Data()->Get_Game_Title ();
  309. wide_map_name.Convert_From (channel->Get_Game_Data ()->Get_Map_Name ());
  310. //
  311. // Get the current and max players for this channel
  312. //
  313. int player_count = channel->Get_Game_Data()->Get_Current_Players ();
  314. int player_count_max = channel->Get_Game_Data()->Get_Max_Players ();
  315. //
  316. // Build a string that represents the player count
  317. //
  318. WideStringClass players_string;
  319. players_string.Format (L"%d/%d", player_count, player_count_max);
  320. //
  321. // Build a string that represents the connection (ping) speed
  322. //
  323. int ping = 0;
  324. WideStringClass ping_string;
  325. ping_string.Format (L"%d", ping);
  326. //
  327. // If this is a mod'd game, then display the mod_name\map_name...
  328. //
  329. if (channel->Get_Game_Data()->Get_Mod_Name ().Get_Length () > 0) {
  330. //
  331. // Strip off the extension for both the map and the mod package
  332. //
  333. char map_name[_MAX_FNAME] = { 0 };
  334. char mod_name[_MAX_FNAME] = { 0 };
  335. ::_splitpath (channel->Get_Game_Data ()->Get_Map_Name (), NULL, NULL, map_name, NULL);
  336. ::_splitpath (channel->Get_Game_Data ()->Get_Mod_Name (), NULL, NULL, mod_name, NULL);
  337. //
  338. // Create the map name from the aggregate of the mod and map
  339. //
  340. StringClass ascii_map_name;
  341. ascii_map_name.Format ("%s\\%s", mod_name, map_name);
  342. wide_map_name.Convert_From (ascii_map_name);
  343. }
  344. //
  345. // Update the pla
  346. //
  347. list_ctrl->Set_Entry_Text (item_index, COL_ICON, L"");
  348. list_ctrl->Set_Entry_Text (item_index, COL_HOST_NAME, wide_owner_name);
  349. list_ctrl->Set_Entry_Text (item_index, COL_GAME_NAME, wide_game_name);
  350. list_ctrl->Set_Entry_Text (item_index, COL_GAME_MAP, wide_map_name);
  351. list_ctrl->Set_Entry_Text (item_index, COL_PLAYERS, players_string);
  352. //
  353. // Associate the channel data inside with the entry
  354. //
  355. list_ctrl->Set_Entry_Data (item_index, 0, (uint32)channel);
  356. channel->Add_Ref ();
  357. //
  358. // Should we select this entry?
  359. //
  360. if (wide_owner_name.Compare_No_Case (selected_owner_name) == 0) {
  361. list_ctrl->Set_Curr_Sel (item_index);
  362. found_selected = true;
  363. }
  364. }
  365. //
  366. // Do we have a mismatched exe or missing map?
  367. //
  368. if (channel->Get_Game_Data()->Get_Version_Number() != cNetwork::Get_Exe_Key() ||
  369. channel->Get_Game_Data()->Get_Map_Name().Is_Empty()) {
  370. WideStringClass error_string;
  371. if (channel->Get_Game_Data()->Do_Exe_Versions_Match() == false) {
  372. error_string = TRANSLATE (IDS_MENU_EXE_MISMATCH);
  373. } else if (channel->Get_Game_Data()->Do_String_Versions_Match() == false) {
  374. error_string = TRANSLATE (IDS_MENU_STRINGS_MISMATCH);
  375. } else if (channel->Get_Game_Data()->Get_Map_Name().Is_Empty()) {
  376. error_string = TRANSLATE (IDS_MENU_MISSING_MAP);
  377. }
  378. //
  379. // Notify the user that they can't join this game
  380. //
  381. if (item_index >= 0) {
  382. //list_ctrl->Set_Entry_Text (item_index, COL_HOST_NAME, error_string);
  383. list_ctrl->Set_Entry_Text (item_index, COL_GAME_NAME, error_string);
  384. list_ctrl->Set_Entry_Color (item_index, COL_ICON, Vector3 (0.5F, 0.5F, 0.5F));
  385. list_ctrl->Set_Entry_Color (item_index, COL_HOST_NAME, Vector3 (0.5F, 0.5F, 0.5F));
  386. list_ctrl->Set_Entry_Color (item_index, COL_GAME_NAME, Vector3 (0.5F, 0.5F, 0.5F));
  387. list_ctrl->Set_Entry_Color (item_index, COL_GAME_MAP, Vector3 (0.5F, 0.5F, 0.5F));
  388. list_ctrl->Set_Entry_Color (item_index, COL_PLAYERS, Vector3 (0.5F, 0.5F, 0.5F));
  389. list_ctrl->Set_Entry_Data (item_index, 1, 1);
  390. }
  391. }
  392. }
  393. //
  394. // Select the first entry by default
  395. //
  396. if (found_selected == false && list_ctrl->Get_Entry_Count () > 0) {
  397. list_ctrl->Set_Curr_Sel (0);
  398. }
  399. return ;
  400. }
  401. ////////////////////////////////////////////////////////////////
  402. //
  403. // Join_Game
  404. //
  405. ////////////////////////////////////////////////////////////////
  406. void
  407. MPLanGameListMenuClass::Join_Game (void)
  408. {
  409. ListCtrlClass *list_ctrl = (ListCtrlClass *)Get_Dlg_Item (IDC_GAME_LIST_CTRL);
  410. //
  411. // Get the currently selected index
  412. //
  413. int index = list_ctrl->Get_Curr_Sel ();
  414. if (index >= 0) {
  415. //
  416. // Get the channel data from this entry
  417. //
  418. cGameChannel *channel = (cGameChannel *)list_ctrl->Get_Entry_Data (index, 0);
  419. if (channel != NULL && list_ctrl->Get_Entry_Data (index, 1) == 0) {
  420. //
  421. // Free the old game data (if necessary)
  422. //
  423. if (PTheGameData != NULL) {
  424. delete PTheGameData;
  425. PTheGameData = NULL;
  426. }
  427. //
  428. // Create a new game data object that matches the one on the server
  429. //
  430. PTheGameData = cGameData::Create_Game_Of_Type (channel->Get_Game_Data ()->Get_Game_Type ());
  431. WWASSERT(PTheGameData != NULL);
  432. *PTheGameData = *channel->Get_Game_Data ();
  433. // If the game to join is passworded then it is necessary for the user to
  434. // supply the correct password. Therefore prompt the user to enter the
  435. // password. We will attempt to connect to the game when we receive a
  436. // signal from the dialog that the user has entered a password.
  437. if (PTheGameData->IsPassworded.Is_True()) {
  438. DlgPasswordPrompt::DoDialog(this);
  439. } else {
  440. Connect_To_Server();
  441. }
  442. }
  443. }
  444. return ;
  445. }
  446. ////////////////////////////////////////////////////////////////
  447. //
  448. // Handle receipt of password entered signal from the password
  449. // prompt dialog.
  450. //
  451. ////////////////////////////////////////////////////////////////
  452. void MPLanGameListMenuClass::ReceiveSignal(DlgPasswordPrompt& passwordDialog)
  453. {
  454. WWASSERT(PTheGameData != NULL);
  455. PTheGameData->Set_Password(passwordDialog.GetPassword());
  456. Connect_To_Server();
  457. }
  458. ////////////////////////////////////////////////////////////////
  459. //
  460. // Connect_To_Server
  461. //
  462. ////////////////////////////////////////////////////////////////
  463. void
  464. MPLanGameListMenuClass::Connect_To_Server (void)
  465. {
  466. //
  467. // Set the new nickname
  468. //
  469. WideStringClass nickname = Get_Dlg_Item_Text (IDC_NICKNAME_EDIT);
  470. cNetInterface::Set_Nickname (nickname);
  471. //
  472. // Start the client
  473. //
  474. cNetwork::Init_Client ();
  475. return ;
  476. }
  477. ////////////////////////////////////////////////////////////////
  478. //
  479. // On_ListCtrl_Delete_Entry
  480. //
  481. ////////////////////////////////////////////////////////////////
  482. void
  483. MPLanGameListMenuClass::On_ListCtrl_Delete_Entry
  484. (
  485. ListCtrlClass *list_ctrl,
  486. int ctrl_id,
  487. int item_index
  488. )
  489. {
  490. //
  491. // Get the channel data from this entry
  492. //
  493. cGameChannel *channel = (cGameChannel *)list_ctrl->Get_Entry_Data (item_index, 0);
  494. list_ctrl->Set_Entry_Data (item_index, 0, NULL);
  495. if (channel != NULL) {
  496. channel->Release_Ref ();
  497. }
  498. return ;
  499. }
  500. ////////////////////////////////////////////////////////////////
  501. //
  502. // On_ListCtrl_DblClk
  503. //
  504. ////////////////////////////////////////////////////////////////
  505. void
  506. MPLanGameListMenuClass::On_ListCtrl_DblClk
  507. (
  508. ListCtrlClass *list_ctrl,
  509. int ctrl_id,
  510. int item_index
  511. )
  512. {
  513. Join_Game ();
  514. return ;
  515. }
  516. void MPLanGameListMenuClass::On_EditCtrl_Change(EditCtrlClass* edit, int id)
  517. {
  518. if (IDC_NICKNAME_EDIT == id) {
  519. // Do not allow leading or trailing whitespace
  520. WideStringClass text(0, true);
  521. text = edit->Get_Text();
  522. text.Trim();
  523. edit->Set_Text(text);
  524. bool enable = (edit->Get_Text_Length() > 0);
  525. Enable_Dlg_Item(IDC_JOIN_GAME_BUTTON, enable);
  526. Enable_Dlg_Item(IDC_MENU_MP_LAN_HOST_BUTTON, enable);
  527. }
  528. }
  529. ////////////////////////////////////////////////////////////////
  530. //
  531. // Display
  532. //
  533. ////////////////////////////////////////////////////////////////
  534. void
  535. MPLanGameListMenuClass::Display (void)
  536. {
  537. //
  538. // Create the dialog if necessary, otherwise simply bring it to the front
  539. //
  540. if (_TheInstance == NULL) {
  541. START_DIALOG (MPLanGameListMenuClass);
  542. } else {
  543. if (_TheInstance->Is_Active_Menu () == false) {
  544. DialogMgrClass::Rollback (_TheInstance);
  545. }
  546. }
  547. return ;
  548. }
  549. ////////////////////////////////////////////////////////////////
  550. //
  551. // On_Last_Menu_Ending
  552. //
  553. ////////////////////////////////////////////////////////////////
  554. void
  555. MPLanGameListMenuClass::On_Last_Menu_Ending (void)
  556. {
  557. RenegadeDialogMgrClass::Goto_Location (RenegadeDialogMgrClass::LOC_MAIN_MENU);
  558. return ;
  559. }
  560. /*
  561. if (UpdateNickname && !g_awaiting_edit) {
  562. ::MessageBeep(MB_OK);//XXX
  563. EditCtrlClass* nameEdit = (EditCtrlClass*)Get_Dlg_Item(IDC_NICKNAME_EDIT);
  564. assert(nameEdit != NULL);
  565. nameEdit->Set_Focus();
  566. g_awaiting_edit = true;
  567. }
  568. */
  569. //g_awaiting_edit = false;
  570. //UpdateNickname = false;
  571. //bool g_awaiting_edit = false;//XXX
  572. //#include "dlgmplangametype.h"