Backed out changeset 6e4e745f42bb. Devs are hating it for ... reasons
authorWuzzy <Wuzzy2@mail.ru>
Thu, 04 Oct 2018 20:45:07 +0200
changeset 13838 2b6702777c8c
parent 13837 6e4e745f42bb
child 13841 b2cc4e4e380c
Backed out changeset 6e4e745f42bb. Devs are hating it for ... reasons
ChangeLog.txt
hedgewars/uChat.pas
hedgewars/uGearsRender.pas
--- a/ChangeLog.txt	Thu Oct 04 20:36:41 2018 +0200
+++ b/ChangeLog.txt	Thu Oct 04 20:45:07 2018 +0200
@@ -37,7 +37,6 @@
  * Prevent voices from being spoken directly before a victory voice
  * Fix damage not being displayed if hog drowns in water with 100% opacity (like in Compost theme)
  * Fix retreat timer appearing after using baseball bat or whip and immediately taking damage
- * Speech bubble commands no longer apply to computer-controlled hogs
 
 Frontend:
  + Add setting to disable audio dampening when losing window focus
--- a/hedgewars/uChat.pas	Thu Oct 04 20:36:41 2018 +0200
+++ b/hedgewars/uChat.pas	Thu Oct 04 20:45:07 2018 +0200
@@ -361,7 +361,7 @@
             // default to current hedgehog (if own) or first hedgehog
             if SpeechHogNumber = 0 then
                 begin
-                if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then
+                if not CurrentTeam^.ExtDriven then
                     SpeechHogNumber:= CurrentTeam^.CurrHedgehog + 1
                 else
                     SpeechHogNumber:= 1;
@@ -449,7 +449,7 @@
 else if (s[1] = '-') and (s[Length(s)] = '-') then
     x:= 3;
 
-if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) and (x <> 0) then
+if (not CurrentTeam^.ExtDriven) and (x <> 0) then
     for c:= 0 to Pred(TeamsCount) do
         if (TeamsArray[c] = CurrentTeam) then
             t:= c;
@@ -477,7 +477,7 @@
     // Speech bubble, but on next attack
     if (copy(s, 2, 4) = 'hsa ') then
         begin
-        if (CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0)) then
+        if CurrentTeam^.ExtDriven then
             ParseCommand('/say ' + copy(s, 6, Length(s)-5), true)
         else
             SendHogSpeech(#4 + copy(s, 6, Length(s)-5));
@@ -487,7 +487,7 @@
     // Thinking bubble, but on next attack
     if (copy(s, 2, 4) = 'hta ') then
         begin
-        if (CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0)) then
+        if CurrentTeam^.ExtDriven then
             ParseCommand('/say ' + copy(s, 6, Length(s)-5), true)
         else
             SendHogSpeech(#5 + copy(s, 6, Length(s)-5));
@@ -497,7 +497,7 @@
     // Yelling bubble, but on next attack
     if (copy(s, 2, 4) = 'hya ') then
         begin
-        if (CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0)) then
+        if CurrentTeam^.ExtDriven then
             ParseCommand('/say ' + copy(s, 6, Length(s)-5), true)
         else
             SendHogSpeech(#6 + copy(s, 6, Length(s)-5));
--- a/hedgewars/uGearsRender.pas	Thu Oct 04 20:36:41 2018 +0200
+++ b/hedgewars/uGearsRender.pas	Thu Oct 04 20:45:07 2018 +0200
@@ -225,7 +225,7 @@
 begin
 t:= LocalTeam;
 
-if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then
+if not CurrentTeam^.ExtDriven then
     for i:= 0 to Pred(TeamsCount) do
         if (TeamsArray[i] = CurrentTeam) then
             t:= i;