hedgewars/uChat.pas
changeset 15614 46b7b2c821d0
parent 15613 130b5052335c
child 15687 63e2b7b2ec47
--- a/hedgewars/uChat.pas	Fri Jun 05 00:37:33 2020 +0200
+++ b/hedgewars/uChat.pas	Fri Jun 05 00:57:05 2020 +0200
@@ -635,15 +635,14 @@
         end;
 
     // hedghog animations/taunts and engine commands
-    if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then
-        begin
-        for i:= Low(TWave) to High(TWave) do
-            if (s = Wavez[i].cmd) then
-                begin
+    for i:= Low(TWave) to High(TWave) do
+        if (s = Wavez[i].cmd) then
+            begin
+            // only works for local non-bot teams
+            if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then
                 ParseCommand('/taunt ' + char(i), true);
-                exit
-                end;
-        end;
+            exit;
+            end;
 
     for j:= Low(TChatCmd) to High(TChatCmd) do
         if (s = ChatCommandz[j].ChatCmd) then