hedgewars/uCommandHandlers.pas
changeset 6339 2a3925178178
parent 6313 12567f6f6f02
child 6415 af2047bb4f70
equal deleted inserted replaced
6337:84e7d1a5e3df 6339:2a3925178178
   451 
   451 
   452 procedure chSetMap(var s: shortstring);
   452 procedure chSetMap(var s: shortstring);
   453 begin
   453 begin
   454 if isDeveloperMode then
   454 if isDeveloperMode then
   455     begin
   455     begin
   456     UserPathz[ptMapCurrent]:= UserPathz[ptMaps] + '/' + s;
   456     if s = '' then
   457     Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
   457         begin
       
   458         UserPathz[ptMapCurrent]:= s;
       
   459         Pathz[ptMapCurrent]:= s;
       
   460         end
       
   461     else
       
   462         begin
       
   463         UserPathz[ptMapCurrent]:= UserPathz[ptMaps] + '/' + s;
       
   464         Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
       
   465         end;
   458     InitStepsFlags:= InitStepsFlags or cifMap
   466     InitStepsFlags:= InitStepsFlags or cifMap
   459     end;
   467     end;
   460 
   468 
   461 ScriptLoad('Maps/' + s + '/map.lua')
   469 ScriptLoad('Maps/' + s + '/map.lua')
   462 end;
   470 end;