shithub: choc

Download patch

ref: a84d0161a033548436278a57b7d2c3b09b35b003
parent: 1af09ba2f33e9300420a5ebad01ed15cbfef7835
author: Simon Howard <[email protected]>
date: Mon Oct 17 17:45:50 EDT 2011

Rearrange Hexen startup to fix crash when starting a deathmatch game.

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

--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -346,8 +346,8 @@
     R_Init();
     ST_Message("\n");
 
-    if (M_CheckParm("-net"))
-        ST_NetProgress();       // Console player found
+    //if (M_CheckParm("-net"))
+    //    ST_NetProgress();       // Console player found
 
     ST_Message("P_Init: Init Playloop state.\n");
     P_Init();
@@ -356,14 +356,16 @@
     // MAPINFO.TXT script must be already processed.
     WarpCheck();
 
-    ST_Message("SB_Init: Loading patches.\n");
-    SB_Init();
-
     ST_Done();
 
     // Netgame start must be here, after the splash screen has finished.
     ST_Message("D_CheckNetGame: Checking network game status.\n");
     D_CheckNetGame();
+
+    // SB_Init has been moved here; the status bar must be initialized
+    // *after* the netgame has started.
+    ST_Message("SB_Init: Loading patches.\n");
+    SB_Init();
 
     if (autostart)
     {