DEADSOFTWARE

allow 'mywad.wad:/map01' in '-map' and other similar places (previously, only ':...
[d2df-sdl.git] / src / game / g_menu.pas
index a84251949474de22ad1a163b41c767f5eb2d52e0..aca1dbf59939c6b399c083399728e2396f1f7daf 100644 (file)
@@ -47,7 +47,8 @@ uses
   e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
   MAPDEF, wadreader, Math, g_saveload,
   e_texture, GL, GLExt, g_language,
-  g_net, g_netmsg, g_netmaster, g_items, e_input;
+  g_net, g_netmsg, g_netmaster, g_items, e_input,
+  utils;
 
 
 type TYNCallback = procedure (yes:Boolean);
@@ -551,7 +552,7 @@ begin
     Map := TGUILabel(GetControl('lbMap')).Text;
     if Map = '' then
       Exit;
-    if Pos(':\', Map) = 0 then
+    if not isWadPath(Map) then
       Exit;
 
     GameMode := TGUISwitch(GetControl('swGameMode')).ItemIndex+1;
@@ -611,7 +612,7 @@ begin
     Map := TGUILabel(GetControl('lbMap')).Text;
     if Map = '' then
       Exit;
-    if Pos(':\', Map) = 0 then
+    if not isWadPath(Map) then
       Exit;
 
     GameMode := TGUISwitch(GetControl('swGameMode')).ItemIndex+1;