summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2042803)
raw | patch | inline | side by side (parent: 2042803)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 8 Apr 2016 01:12:37 +0000 (04:12 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 8 Apr 2016 01:13:42 +0000 (04:13 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_map.pas | patch | blob | history | |
src/shared/WADEDITOR.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 408191bb3cd2f2876ca68d0a6cfb3dc1bb59fa81..9cca04c27ce31af3f73ea6daa86c801c7a33e004 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
Exit;
end;
// Èãðà åù¸ íå çàïóùåíà, ñíà÷àëà íàì íàäî çàãðóçèòü êàêîé-òî WAD
- if Pos('.wad', LowerCase(P[1])) = 0 then
+ if (Pos('.wad', LowerCase(P[1])) = 0) and (Pos('.pk3', LowerCase(P[1])) = 0) then
P[1] := P[1] + '.wad';
if FileExists(MapsDir + P[1]) then
Exit;
prt := StrToIntDef(P[2], 25666);
- if Pos('.wad', LowerCase(P[3])) = 0 then
+ if (Pos('.wad', LowerCase(P[3])) = 0) and (Pos('.pk3', LowerCase(P[3])) = 0) then
P[3] := P[3] + '.wad';
if FileExists(MapsDir + P[3]) then
begin
g_Console_Add(Format(_lc[I_MSG_NO_MAP], [s]));
// Òàêîé êàðòû íåò, èùåì WAD ôàéë
- if Pos('.wad', LowerCase(P[1])) = 0 then
+ if (Pos('.wad', LowerCase(P[1])) = 0) and (Pos('.pk3', LowerCase(P[1])) = 0) then
P[1] := P[1] + '.wad';
if FileExists(MapsDir + P[1]) then
end else
begin
// Óêàçàíî äâà ïàðàìåòðà, çíà÷èò ïåðâûé - WAD ôàéë, à âòîðîé - êàðòà
- if Pos('.wad', LowerCase(P[1])) = 0 then
+ if (Pos('.wad', LowerCase(P[1])) = 0) and (Pos('.pk3', LowerCase(P[1])) = 0) then
P[1] := P[1] + '.wad';
if FileExists(MapsDir + P[1]) then
begin
g_Console_Add(Format(_lc[I_MSG_NO_MAP], [s]));
// Òàêîé êàðòû íåò, èùåì WAD ôàéë
- if Pos('.wad', LowerCase(P[1])) = 0 then
+ if (Pos('.wad', LowerCase(P[1])) = 0) and (Pos('.pk3', LowerCase(P[1])) = 0) then
P[1] := P[1] + '.wad';
if FileExists(MapsDir + P[1]) then
end else
begin
// Óêàçàíî äâà ïàðàìåòðà, çíà÷èò ïåðâûé - WAD ôàéë, à âòîðîé - êàðòà
- if Pos('.wad', LowerCase(P[1])) = 0 then
+ if (Pos('.wad', LowerCase(P[1])) = 0) and (Pos('.pk3', LowerCase(P[1])) = 0) then
P[1] := P[1] + '.wad';
if FileExists(MapsDir + P[1]) then
// Start map when game loads:
map := LowerCase(Find_Param_Value(pars, '-map'));
- if (map <> '') and (Pos('.wad:\', map) > 0) then
+ if (map <> '') and ((Pos('.wad:\', map) > 0) or (Pos('.pk3:\', map) > 0)) then
begin
// Game mode:
s := Find_Param_Value(pars, '-gm');
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index 820dcf99e75339f74326e45037bea2c60cef4fe5..358b16d15e44d7ec97e9eb3e63c6af22871e29dc 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
g_ProcessResourceStr(Res, FileName, SectionName, ResName);
- if Pos('.wad', LowerCase(FileName)) = 0 then FileName := FileName+'.wad';
+ if (Pos('.wad', LowerCase(FileName)) = 0) and (Pos('.pk3', LowerCase(FileName)) = 0) then FileName := FileName+'.wad';
WAD := TWADEditor_1.Create;
if not WAD.ReadFile(FileName) then
index 4c3e9aeee201630ac4394980ba2d6f2d86f7cd6c..0c3357b58c6cf7f37df37ca984c69ddc402f4da7 100644 (file)
--- a/src/shared/WADEDITOR.pas
+++ b/src/shared/WADEDITOR.pas
begin
rfn := Copy(rfn, 1, length(rfn)-4);
if FileExists(rfn+'.pk3') then rfn := rfn+'.pk3'
- else if FileExists(rfn+'.zip') then rfn := rfn+'.zip'
+ //else if FileExists(rfn+'.zip') then rfn := rfn+'.zip'
else rfn := FileName;
{.$IFDEF SFS_DWFAD_DEBUG}
if gSFSDebug then