@@ -919,18 +919,7 @@ bool LoadMission(const char *mssn) {
919919 ResetMission (); // Reset everything.
920920 // open MN3 if filename passed was an mn3 file.
921921
922- // Correct for mission split hack
923-
924- if (stricmp (mssn, " d3_2.mn3" ) == 0 ) {
925- strcpy (mission, " d3_2.mn3" );
926- strcpy (pathname, " d3_2.mn3" );
927-
928- } else if (stricmp (mssn, " d3.mn3" ) == 0 ) {
929- strcpy (mission, " d3.mn3" );
930- strcpy (pathname, " d3.mn3" );
931-
932- }
933- else if (IS_MN3_FILE (mssn)) {
922+ if (IS_MN3_FILE (mssn)) {
934923 strcpy (mission, mssn);
935924 ddio_MakePath (pathname, D3MissionsDir, mission, NULL );
936925 } else {
@@ -1837,13 +1826,9 @@ bool mn3_Open(const char *mn3file) {
18371826 mn3file = tempMn3File;
18381827 }
18391828
1840- const char *p = GetMultiCDPath ((char *)mn3file);
1841- // ddio_MakePath(pathname, D3MissionsDir, mn3file, NULL);
1842- if (!p)
1843- return false ;
1844- strcpy (pathname, p);
1829+ ddio_MakePath (pathname, D3MissionsDir, mn3file, NULL );
18451830 // open MN3 HOG.
1846- mn3_handle = cf_OpenLibrary (pathname );
1831+ mn3_handle = cf_OpenLibrary (mn3file );
18471832 if (mn3_handle == 0 ) {
18481833 return false ;
18491834 } else {
@@ -1852,42 +1837,30 @@ bool mn3_Open(const char *mn3file) {
18521837 // do table file stuff.
18531838 ddio_SplitPath (mn3file, NULL , filename, ext);
18541839
1855- // char voice_hog[_MAX_PATH*2];
1840+ char voice_hog[_MAX_PATH*2 ];
18561841 if ((stricmp (filename, " d3" ) == 0 ) || (stricmp (filename, " training" ) == 0 )) {
18571842 // Open audio hog file
1858- // ddio_MakePath(voice_hog, D3MissionsDir, "d3voice1.hog", NULL);//Audio for levels 1-4
1859- const char *v = GetMultiCDPath (" d3voice1.hog" );
1860- if (!v)
1861- return false ;
1862- Mission_voice_hog_handle = cf_OpenLibrary (v);
1843+ ddio_MakePath (voice_hog, D3MissionsDir, " d3voice1.hog" , nullptr ); // Audio for levels 1-4
1844+ Mission_voice_hog_handle = cf_OpenLibrary (voice_hog);
18631845 } else if (stricmp (filename, " d3_2" ) == 0 ) {
18641846 // Open audio hog file
1865- // ddio_MakePath(voice_hog, D3MissionsDir, "d3voice2.hog", NULL);//Audio for levels 5-17
1866- const char *v = GetMultiCDPath (" d3voice2.hog" );
1867- if (!v)
1868- return false ;
1869- Mission_voice_hog_handle = cf_OpenLibrary (v);
1847+ ddio_MakePath (voice_hog, D3MissionsDir, " d3voice2.hog" , nullptr ); // Audio for levels 5-17
1848+ Mission_voice_hog_handle = cf_OpenLibrary (voice_hog);
18701849 }
18711850 strcat (filename, " .gam" );
18721851 mng_SetAddonTable (filename);
18731852 Current_mission.mn3_handle = mn3_handle;
18741853 return true ;
18751854}
1855+
18761856// returns mission information given the mn3 file.
18771857bool mn3_GetInfo (const char *mn3file, tMissionInfo *msn) {
18781858 int handle;
18791859 bool retval;
18801860 char pathname[_MAX_PATH];
18811861 char filename[PSFILENAME_LEN + 1 ];
18821862
1883- if (stricmp (mn3file, " d3.mn3" ) == 0 ) {
1884- const char *p = GetMultiCDPath ((char *)mn3file);
1885- if (!p)
1886- return false ;
1887- strcpy (pathname, p);
1888- } else {
1889- ddio_MakePath (pathname, D3MissionsDir, mn3file, NULL );
1890- }
1863+ ddio_MakePath (pathname, D3MissionsDir, mn3file, nullptr );
18911864 handle = cf_OpenLibrary (pathname);
18921865 if (handle == 0 ) {
18931866 mprintf (0 , " MISSION: MN3 failed to open.\n " );
0 commit comments