diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index eaccccca74e1523f2ecabebfd34367f9a8f64ef0..53280381f8b390f9e16819f49786a3fd90e0cfc0 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
if (s <> '') then
gMapOnce := True;
+ // Override map to test:
+ s := LowerCase(Find_Param_Value(pars, '-testmap'));
+ if s <> '' then
+ gTestMap := MapsDir + s;
+
// Delete test map after play:
s := Find_Param_Value(pars, '--testdelete');
if (s <> '') then
// Delete temporary WAD after play:
s := Find_Param_Value(pars, '--tempdelete');
- if (s <> '') then
+ if (s <> '') and (gTestMap <> '') then
begin
- gMapToDelete := MapsDir + map;
+ gMapToDelete := gTestMap;
gTempDelete := True;
end;