hedgewars/uInputHandler.pas
branch0.9.18
changeset 7946 a99a79bbd857
parent 7876 a366fbe91b58
child 7974 7ac6699b6228
equal deleted inserted replaced
7944:a94f4ef5ba2b 7946:a99a79bbd857
   119     s      : string;
   119     s      : string;
   120 begin
   120 begin
   121 if not(tkbd[code] xor KeyDown) then exit;
   121 if not(tkbd[code] xor KeyDown) then exit;
   122 tkbd[code]:= KeyDown;
   122 tkbd[code]:= KeyDown;
   123 
   123 
   124 hideAmmoMenu:= false;
       
   125 Trusted:= (CurrentTeam <> nil)
   124 Trusted:= (CurrentTeam <> nil)
   126           and (not CurrentTeam^.ExtDriven)
   125           and (not CurrentTeam^.ExtDriven)
   127           and (CurrentHedgehog^.BotLevel = 0);
   126           and (CurrentHedgehog^.BotLevel = 0);
   128 
   127 
   129 // ctrl/cmd + q to close engine and frontend
   128 // ctrl/cmd + q to close engine and frontend
   153         ParseCommand('forcequit', true);
   152         ParseCommand('forcequit', true);
   154     end;
   153     end;
   155 
   154 
   156 if CurrentBinds[code][0] <> #0 then
   155 if CurrentBinds[code][0] <> #0 then
   157     begin
   156     begin
   158     if (code > 3) and KeyDown and (not ((CurrentBinds[code] = 'put')) or (CurrentBinds[code] = 'ammomenu') or (CurrentBinds[code] = '+cur_u') or (CurrentBinds[code] = '+cur_d') or (CurrentBinds[code] = '+cur_l') or (CurrentBinds[code] = '+cur_r')) then hideAmmoMenu:= true;
   157     if (code > 3) and KeyDown and (not ((CurrentBinds[code] = 'put')) or (CurrentBinds[code] = 'ammomenu') or (CurrentBinds[code] = '+cur_u') or (CurrentBinds[code] = '+cur_d') or (CurrentBinds[code] = '+cur_l') or (CurrentBinds[code] = '+cur_r')) and (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) then bShowAmmoMenu:= false;
   159 
   158 
   160     if KeyDown then
   159     if KeyDown then
   161         begin
   160         begin
   162         ParseCommand(CurrentBinds[code], Trusted);
   161         ParseCommand(CurrentBinds[code], Trusted);
   163         if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then
   162         if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then