shithub: choc

Download patch

ref: 4746d23891ba45977b5f615859455a4ae7ec6f6c
parent: 6a51ab4fdfcb3a606310cbc1c26e3a81bab510be
author: Simon Howard <fraggle@soulsphere.org>
date: Sun Oct 22 15:13:44 EDT 2017

strife: Move D_IdentifyVersion() earlier in startup.

D_IdentifyVersion() as well as identifying the game version also
loads voices.wad. In order to support WADs which replace lumps from
voices.wad, this needs to be loaded before any PWADs are loaded; this
is also consistent with vanilla Strife behavior. The voices.wad file
was also being loaded after initialization of the WAD file hash table,
which was less efficient.

This fixes #906. Thanks @Catoptromancy for reporting.

--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1726,6 +1726,7 @@
         DEH_printf("W_Init: Init WADfiles.\n");
     D_AddFile(iwadfile);
     W_CheckCorrectIWAD(strife);
+    D_IdentifyVersion();
 
     // Load dehacked patches specified on the command line.
     DEH_ParseCommandLine();
@@ -1815,8 +1816,7 @@
     // Generate the WAD hash table.  Speed things up a bit.
 
     W_GenerateHashTable();
-    
-    D_IdentifyVersion();
+
     InitGameVersion();
     InitTitleString();
     D_SetGameDescription();