add missing user path check
authornemo
Tue, 14 Jun 2011 14:00:29 -0400
changeset 5241 e1fb0fc971c6
parent 5240 9135c1905415
child 5242 e4f6aa3250eb
add missing user path check
hedgewars/uLand.pas
--- a/hedgewars/uLand.pas	Tue Jun 14 11:29:15 2011 -0400
+++ b/hedgewars/uLand.pas	Tue Jun 14 14:00:29 2011 -0400
@@ -1178,7 +1178,8 @@
 TryDo((tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT), 'Map dimensions too big!', true);
 
 // unC0Rr - should this be passed from the GUI? I am not sure which layer does what
-s:= Pathz[ptMapCurrent] + '/map.cfg';
+s:= UserPathz[ptMapCurrent] + '/map.cfg';
+if not FileExists(s) then s:= Pathz[ptMapCurrent] + '/map.cfg';
 WriteLnToConsole('Fetching map HH limit');
 {$I-}
 Assign(f, s);