Fix bug with handling keys while it is AI's turn
authorunc0rr
Tue, 15 Apr 2008 16:13:24 +0000
changeset 846 08c3f0bc766c
parent 845 ca72cf446ec2
child 847 66970c0ed3aa
Fix bug with handling keys while it is AI's turn
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);