hedgewars/uKeys.pas
changeset 4531 4ea193b0e378
parent 4403 0dfe26f48ec1
child 4744 ecc2c757d0df
--- a/hedgewars/uKeys.pas	Tue Dec 14 17:47:53 2010 -0500
+++ b/hedgewars/uKeys.pas	Tue Dec 14 18:18:54 2010 -0500
@@ -171,14 +171,19 @@
 if CurrentBinds[i][0] <> #0 then
     begin
     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;
-    if (tkbd[i] = 0) and (tkbdn[i] <> 0) then ParseCommand(CurrentBinds[i], Trusted)
+    if (tkbd[i] = 0) and (tkbdn[i] <> 0) then
+         begin
+         ParseCommand(CurrentBinds[i], Trusted);
+         if (CurrentTeam <> nil) and not CurrentTeam^.ExtDriven and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true)
+         end
     else if (CurrentBinds[i][1] = '+')
             and (tkbdn[i] = 0)
             and (tkbd[i] <> 0) then
             begin
             s:= CurrentBinds[i];
             s[1]:= '-';
-            ParseCommand(s, Trusted)
+            ParseCommand(s, Trusted);
+            if (CurrentTeam <> nil) and not CurrentTeam^.ExtDriven and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true)
             end;
     tkbd[i]:= tkbdn[i]
     end