hedgewars/uCommandHandlers.pas
branchhedgeroid
changeset 6224 42b256eca362
parent 5725 e27100a0e2d0
parent 6131 4e8816cf9459
child 6328 d14adf1c7721
equal deleted inserted replaced
6055:88cfcd9161d3 6224:42b256eca362
    83 end;
    83 end;
    84 
    84 
    85 procedure chCheckProto(var s: shortstring);
    85 procedure chCheckProto(var s: shortstring);
    86 var i, c: LongInt;
    86 var i, c: LongInt;
    87 begin
    87 begin
    88 if isDeveloperMode then
    88     if isDeveloperMode then
    89 begin
    89         begin
    90 val(s, i, c);
    90         val(s, i, c);
    91 if (c <> 0) or (i = 0) then exit;
    91         if (c <> 0) or (i = 0) then exit;
    92 TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true);
    92         TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    93 TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true)
    93         TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    94 end
    94     end
    95 end;
    95 end;
    96 
    96 
    97 procedure chTeamLocal(var s: shortstring);
    97 procedure chTeamLocal(var s: shortstring);
    98 begin
    98 begin
    99 s:= s; // avoid compiler hint
    99 s:= s; // avoid compiler hint
   449 end;
   449 end;
   450 
   450 
   451 procedure chSetMap(var s: shortstring);
   451 procedure chSetMap(var s: shortstring);
   452 begin
   452 begin
   453 if isDeveloperMode then
   453 if isDeveloperMode then
   454 begin
   454     begin
   455 UserPathz[ptMapCurrent]:= UserPathz[ptMaps] + '/' + s;
   455     UserPathz[ptMapCurrent]:= UserPathz[ptMaps] + '/' + s;
   456 Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
   456     Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
   457 InitStepsFlags:= InitStepsFlags or cifMap
   457     InitStepsFlags:= InitStepsFlags or cifMap
   458 end
   458     end;
       
   459 
       
   460 ScriptLoad(s)
   459 end;
   461 end;
   460 
   462 
   461 procedure chSetTheme(var s: shortstring);
   463 procedure chSetTheme(var s: shortstring);
   462 begin
   464 begin
   463 if isDeveloperMode then
   465 if isDeveloperMode then