ref: 1a20757516d576dec50d01fe3d75091453cf766b
parent: 1041b5c556554d03fcea8d497a5158ac2e5792a4
author: Simon Howard <[email protected]>
date: Sat Jan 6 20:58:16 EST 2007
Display a message on the console with details when WAD/DEH checksums do not match. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 825
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -153,6 +153,20 @@
TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, startgame);
}
+static void PrintMD5Digest(char *s, byte *digest)
+{
+ int i;
+
+ printf("%s: ", s);
+
+ for (i=0; i<sizeof(md5_digest_t); ++i)
+ {
+ printf("%02x", digest[i]);
+ }
+
+ printf("\n");
+}
+
static void CheckMD5Sums(void)
{
boolean correct_wad, correct_deh;
@@ -173,6 +187,28 @@
if (correct_wad && correct_deh && same_freedoom)
{
return;
+ }
+
+ if (!correct_wad)
+ {
+ printf("Warning: WAD MD5 does not match server:\n");
+ PrintMD5Digest("Local", net_local_wad_md5sum);
+ PrintMD5Digest("Server", net_server_wad_md5sum);
+ }
+
+ if (!same_freedoom)
+ {
+ printf("Warning: Mixing Freedoom with non-Freedoom\n");
+ printf("Local: %i Server: %i\n",
+ net_local_is_freedoom,
+ net_server_is_freedoom);
+ }
+
+ if (!correct_deh)
+ {
+ printf("Warning: Dehacked MD5 does not match server:\n");
+ PrintMD5Digest("Local", net_local_deh_md5sum);
+ PrintMD5Digest("Server", net_server_deh_md5sum);
}
window = TXT_NewWindow("WARNING");