summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 82e244a)
raw | patch | inline | side by side (parent: 82e244a)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Fri, 12 Apr 2019 14:26:28 +0000 (17:26 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Fri, 12 Apr 2019 14:26:28 +0000 (17:26 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/shared/utils.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 26465349d5047fb6dc9de60e125f7607174d662f..7c413aabd2ed8166a05bdaeba151d8aa78d8af3d 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
end else
begin
// Òàêîé êàðòû íåò, èùåì WAD ôàéë
- P[1] := addWadExtension(P[1]);
- g_Console_Add(Format(_lc[I_MSG_NO_MAP_FALLBACK], [s, P[1]]));
- if FileExists(MapsDir + P[1]) then
+ pw := findDiskWad(MapsDir + P[1]);
+ g_Console_Add(Format(_lc[I_MSG_NO_MAP_FALLBACK], [s, 'WAD ' + P[1]]));
+ if FileExists(pw) then
begin
// Ïàðàìåòðà êàðòû íåò, ïîýòîìó ñòàâèì ïåðâóþ èç ôàéëà
SetLength(P, 3);
+ P[1] := ExtractRelativePath(MapsDir, pw);
P[2] := g_Game_GetFirstMap(MapsDir + P[1]);
s := P[1] + ':\' + P[2];
diff --git a/src/shared/utils.pas b/src/shared/utils.pas
index 16006052e826e21e09f2f0cdfd1cc3247f095864..21172272a8a01ca64132494ddeed01fb63b0d27c 100644 (file)
--- a/src/shared/utils.pas
+++ b/src/shared/utils.pas
end;
-const fileExtensions: array [0..6] of AnsiString = ('.wad', '.dfzip', '.dfwad', '.pk3', '.pak', '.zip', '.dfz');
+const fileExtensions: array [0..6] of AnsiString = ('.dfz', '.wad', '.dfwad', '.pk3', '.pak', '.zip', '.dfzip');
function findDiskWad (fname: AnsiString): AnsiString;
var