hedgewars/uInputHandler.pas
changeset 9693 9e31e3bb4476
parent 9678 aa349a876c93
child 9714 54d756b6dbb1
--- a/hedgewars/uInputHandler.pas	Tue Nov 12 15:38:45 2013 +0400
+++ b/hedgewars/uInputHandler.pas	Tue Nov 12 22:34:54 2013 -0500
@@ -170,6 +170,9 @@
 
     if KeyDown then
         begin
+        if CurrentBinds[code] = 'switch' then
+            LocalMessage:= LocalMessage or gmSwitch;
+            
         ParseCommand(CurrentBinds[code], Trusted);
         if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then
             ParseCommand('gencmd R', true)
@@ -181,7 +184,12 @@
         ParseCommand(s, Trusted);
         if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then
             ParseCommand('gencmd R', true)
-        end;
+        end
+    else
+        begin
+        if CurrentBinds[code] = 'switch' then
+            LocalMessage:= LocalMessage and not(gmSwitch)
+        end
     end
 end;