hedgewars/uLand.pas
changeset 5241 e1fb0fc971c6
parent 5238 46ddaf14509d
child 5274 941da059472b
equal deleted inserted replaced
5240:9135c1905415 5241:e1fb0fc971c6
  1176     if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptMissionMaps] + '/' + mapName + '/map', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
  1176     if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptMissionMaps] + '/' + mapName + '/map', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
  1177 end;
  1177 end;
  1178 TryDo((tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT), 'Map dimensions too big!', true);
  1178 TryDo((tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT), 'Map dimensions too big!', true);
  1179 
  1179 
  1180 // unC0Rr - should this be passed from the GUI? I am not sure which layer does what
  1180 // unC0Rr - should this be passed from the GUI? I am not sure which layer does what
  1181 s:= Pathz[ptMapCurrent] + '/map.cfg';
  1181 s:= UserPathz[ptMapCurrent] + '/map.cfg';
       
  1182 if not FileExists(s) then s:= Pathz[ptMapCurrent] + '/map.cfg';
  1182 WriteLnToConsole('Fetching map HH limit');
  1183 WriteLnToConsole('Fetching map HH limit');
  1183 {$I-}
  1184 {$I-}
  1184 Assign(f, s);
  1185 Assign(f, s);
  1185 filemode:= 0; // readonly
  1186 filemode:= 0; // readonly
  1186 Reset(f);
  1187 Reset(f);