# HG changeset patch # User unc0rr # Date 1208276004 0 # Node ID 08c3f0bc766ca1ea8fd565e598d161bbf80ed4ec # Parent ca72cf446ec2b8aeee7c53a646c87f817f5e01e1 Fix bug with handling keys while it is AI's turn diff -r ca72cf446ec2 -r 08c3f0bc766c hedgewars/uKeys.pas --- a/hedgewars/uKeys.pas Sun Apr 13 16:14:13 2008 +0000 +++ b/hedgewars/uKeys.pas Tue Apr 15 16:13:24 2008 +0000 @@ -59,7 +59,7 @@ KbdKeyPressed:= false; Trusted:= (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) - and (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].BotLevel = 0); + and (CurrentHedgehog^.BotLevel = 0); pkbd:= SDL_GetKeyState(nil); i:= SDL_GetMouseState(nil, nil); @@ -77,7 +77,7 @@ begin s:= CurrentBinds[i]; s[1]:= '-'; - ParseCommand(s, true) + ParseCommand(s, Trusted) end; end else if (tkbd[i] = 0) and (pkbd^[i] <> 0) then ParseCommand(CurrentBinds[i], Trusted);