From: Ketmar Dark Date: Sun, 24 Dec 2017 11:16:16 +0000 (+0200) Subject: fixed error message if default megawad map failed to load X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=f30340db49c1948582ae5fca86ac481cee797545;p=d2df-sdl.git fixed error message if default megawad map failed to load --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 569d02e..78c8dba 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -3785,6 +3785,7 @@ end; procedure g_Game_StartSingle(Map: String; TwoPlayers: Boolean; nPlayers: Byte); var i, nPl: Integer; + tmps: AnsiString; begin g_Game_Free(); @@ -3840,7 +3841,8 @@ begin // Çàãðóçêà è çàïóñê êàðòû: if not g_Game_StartMap(MAP, True) then begin - g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [gGameSettings.WAD + ':\' + MAP])); + if (Pos(':\', Map) > 0) or (Pos(':/', Map) > 0) then tmps := Map else tmps := gGameSettings.WAD + ':\' + MAP; + g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [tmps])); Exit; end; diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 18debdd..a3d7017 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -436,7 +436,7 @@ begin gSFSFastMode := config.ReadBool('Game', 'SFSFastMode', False); wadoptFast := gSFSFastMode; e_FastScreenshots := config.ReadBool('Game', 'FastScreenshots', True); - gDefaultMegawadStart := config.ReadStr('Game', 'DefaultMegawadStart', 'megawads/DOOM2D.WAD:\MAP01'); + gDefaultMegawadStart := config.ReadStr('Game', 'DefaultMegawadStart', DF_Default_Megawad_Start); gBerserkAutoswitch := config.ReadBool('Game', 'BerserkAutoswitching', True); // Ãåéìïëåé â ñâîåé èãðå