hedgewars/uKeys.pas
changeset 4531 4ea193b0e378
parent 4403 0dfe26f48ec1
child 4744 ecc2c757d0df
equal deleted inserted replaced
4530:984f74b2f498 4531:4ea193b0e378
   169 // now process strokes
   169 // now process strokes
   170 for i:= 0 to cKeyMaxIndex do
   170 for i:= 0 to cKeyMaxIndex do
   171 if CurrentBinds[i][0] <> #0 then
   171 if CurrentBinds[i][0] <> #0 then
   172     begin
   172     begin
   173     if (i > 3) and (tkbdn[i] <> 0) and not ((CurrentBinds[i] = 'put') or (CurrentBinds[i] = 'ammomenu') or (CurrentBinds[i] = '+cur_u') or (CurrentBinds[i] = '+cur_d') or (CurrentBinds[i] = '+cur_l') or (CurrentBinds[i] = '+cur_r')) then hideAmmoMenu:= true;
   173     if (i > 3) and (tkbdn[i] <> 0) and not ((CurrentBinds[i] = 'put') or (CurrentBinds[i] = 'ammomenu') or (CurrentBinds[i] = '+cur_u') or (CurrentBinds[i] = '+cur_d') or (CurrentBinds[i] = '+cur_l') or (CurrentBinds[i] = '+cur_r')) then hideAmmoMenu:= true;
   174     if (tkbd[i] = 0) and (tkbdn[i] <> 0) then ParseCommand(CurrentBinds[i], Trusted)
   174     if (tkbd[i] = 0) and (tkbdn[i] <> 0) then
       
   175          begin
       
   176          ParseCommand(CurrentBinds[i], Trusted);
       
   177          if (CurrentTeam <> nil) and not CurrentTeam^.ExtDriven and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true)
       
   178          end
   175     else if (CurrentBinds[i][1] = '+')
   179     else if (CurrentBinds[i][1] = '+')
   176             and (tkbdn[i] = 0)
   180             and (tkbdn[i] = 0)
   177             and (tkbd[i] <> 0) then
   181             and (tkbd[i] <> 0) then
   178             begin
   182             begin
   179             s:= CurrentBinds[i];
   183             s:= CurrentBinds[i];
   180             s[1]:= '-';
   184             s[1]:= '-';
   181             ParseCommand(s, Trusted)
   185             ParseCommand(s, Trusted);
       
   186             if (CurrentTeam <> nil) and not CurrentTeam^.ExtDriven and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true)
   182             end;
   187             end;
   183     tkbd[i]:= tkbdn[i]
   188     tkbd[i]:= tkbdn[i]
   184     end
   189     end
   185 end;
   190 end;
   186 
   191