From 2561fee6091fec2248a102e951cc108f3e2ea4b7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 Oct 2006 12:55:02 +0000 Subject: Display a different message from the normal WAD directory warning if players are mixing Freedoom/Original IWADs. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 698 --- src/net_gui.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'src/net_gui.c') diff --git a/src/net_gui.c b/src/net_gui.c index aa08c950..7ef9d909 100644 --- a/src/net_gui.c +++ b/src/net_gui.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_gui.c 697 2006-10-14 11:53:08Z fraggle $ +// $Id: net_gui.c 698 2006-10-14 12:55:02Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -192,6 +192,7 @@ static void UpdateGUI(void) static void CheckMD5Sums(void) { boolean correct_wad, correct_deh; + boolean same_freedoom; txt_window_t *window; if (!net_client_received_wait_data || had_warning) @@ -203,8 +204,9 @@ static void CheckMD5Sums(void) sizeof(md5_digest_t)) == 0; correct_deh = memcmp(net_local_deh_md5sum, net_server_deh_md5sum, sizeof(md5_digest_t)) == 0; + same_freedoom = net_server_is_freedoom == net_local_is_freedoom; - if (correct_wad && correct_deh) + if (correct_wad && correct_deh && same_freedoom) { return; } @@ -213,13 +215,35 @@ static void CheckMD5Sums(void) TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, NULL); - if (!correct_wad) + if (!same_freedoom) + { + // If Freedoom and Doom IWADs are mixed, the WAD directory + // will be wrong, but this is not neccessarily a problem. + // Display a different message to the WAD directory message. + + if (net_local_is_freedoom) + { + TXT_AddWidget(window, TXT_NewLabel + ("You are using the Freedoom IWAD to play with players\n" + "using an official Doom IWAD. Make sure that you are\n" + "playing the same levels as other players.\n")); + } + else + { + TXT_AddWidget(window, TXT_NewLabel + ("You are using an official IWAD to play with players\n" + "using the Freedoom IWAD. Make sure that you are\n" + "playing the same levels as other players.\n")); + } + } + else if (!correct_wad) { TXT_AddWidget(window, TXT_NewLabel ("Your WAD directory does not match other players in the game.\n" "Check that you have loaded the exact same WAD files as other\n" "players.\n")); } + if (!correct_deh) { TXT_AddWidget(window, TXT_NewLabel -- cgit v1.2.3