summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e784adb)
raw | patch | inline | side by side (parent: e784adb)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 7 Dec 2019 17:22:19 +0000 (20:22 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 7 Dec 2019 17:22:19 +0000 (20:22 +0300) |
src/editor/f_main.pas | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 00802bbdd83bed88d058252f8107dc09979495bd..225daecbb528255b4ad1c689dcdb14b2e59d705d 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
procedure TMainForm.miTestMapClick(Sender: TObject);
var
- newWAD, oldWAD, tempMap: String;
+ newWAD, oldWAD, tempMap, ext: String;
args: SSArray;
opt: LongWord;
time, i: Integer;
// Сохраняем временную карту:
time := 0;
repeat
- newWAD := ExtractFilePath(TestD2dExe) + Format('maps/temp%.4d.wad', [time]);
+ newWAD := ExtractFilePath(TestD2dExe) + Format('maps/temp%.4d', [time]);
Inc(time);
until not FileExists(newWAD);
if OpenedMap <> '' then
begin
oldWad := g_ExtractWadName(OpenedMap);
+ newWad := newWad + ExtractFileExt(oldWad);
if CopyFile(oldWad, newWad) = false then
e_WriteLog('MapTest: unable to copy [' + oldWad + '] to [' + newWad + ']', MSG_WARNING)
+ end
+ else
+ begin
+ newWad := newWad + '.wad'
end;
tempMap := newWAD + ':\' + TEST_MAP_NAME;
SaveMap(tempMap);