shithub: choc

Download patch

ref: 466e09152f9fd24dfb24fcdf6b95731ae9e0f4ed
parent: 4e4f77f13ef73ad62dc96b3f9bcac7f01697196a
author: Simon Howard <[email protected]>
date: Wed Sep 4 00:07:51 EDT 2013

Don't show ENDOOM screen when aborting netgame startup (thanks Alexandre
Xavier).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2635

--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -128,6 +128,9 @@
 // "BFG Edition" version of doom2.wad does not include TITLEPIC.
 boolean         bfgedition;
 
+// If true, the main game loop has started.
+boolean         main_loop_started = false;
+
 char		wadfile[1024];		// primary wad file
 char		mapdir[1024];           // directory of development maps
 
@@ -416,7 +419,9 @@
 {
     if (demorecording)
 	G_BeginRecording ();
-		
+
+    main_loop_started = true;
+
     TryRunTics();
 
     I_SetWindowTitle(gamedescription);
@@ -1024,9 +1029,11 @@
     byte *endoom;
 
     // Don't show ENDOOM if we have it disabled, or we're running
-    // in screensaver or control test mode.
+    // in screensaver or control test mode. Only show it once the
+    // game has actually started.
 
-    if (!show_endoom || screensaver_mode || M_CheckParm("-testcontrols") > 0)
+    if (!show_endoom || !main_loop_started
+     || screensaver_mode || M_CheckParm("-testcontrols") > 0)
     {
         return;
     }
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -79,6 +79,7 @@
 int UpdateState;
 static int graphical_startup = 1;
 static boolean using_graphical_startup;
+static boolean main_loop_started = false;
 boolean autostart;
 extern boolean automapactive;
 
@@ -254,6 +255,8 @@
     I_InitGraphics();
     I_SetGrabMouseCallback(D_GrabMouseCallback);
 
+    main_loop_started = true;
+
     while (1)
     {
         // Frame syncronous IO operations
@@ -782,7 +785,7 @@
 
     // Disable ENDOOM?
 
-    if (!show_endoom || testcontrols)
+    if (!show_endoom || testcontrols || !main_loop_started)
     {
         return;
     }
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -150,6 +150,10 @@
 int             show_endoom = 1;
 int             graphical_startup = 1;
 
+// If true, startup has completed and the main game loop has started.
+
+static boolean main_loop_started = false;
+
 // fraggle 06/03/11 [STRIFE]: Unused config variable, preserved
 // for compatibility:
 
@@ -490,6 +494,8 @@
     if (demorecording)
         G_BeginRecording ();
 
+    main_loop_started = true;
+
     TryRunTics();
 
     if (!showintro)
@@ -1038,9 +1044,11 @@
     byte *endoom;
 
     // Don't show ENDOOM if we have it disabled, or we're running
-    // in screensaver or control test mode.
+    // in screensaver or control test mode. Only show it once the
+    // game has actually started.
 
-    if (!show_endoom || screensaver_mode || testcontrols)
+
+    if (!show_endoom || !main_loop_started || screensaver_mode || testcontrols)
     {
         return;
     }