Fix taunt commands triggering 'unknown chat command' warning if current hog is external or bot
--- 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