Finally fix bubbles
authorunc0rr
Sun, 24 May 2009 15:01:10 +0000
changeset 2111 9be70514954c
parent 2110 df2a1fe3617a
child 2112 1e1726fb6a90
Finally fix bubbles
hedgewars/CCHandlers.inc
hedgewars/uChat.pas
--- a/hedgewars/CCHandlers.inc	Sun May 24 14:03:59 2009 +0000
+++ b/hedgewars/CCHandlers.inc	Sun May 24 15:01:10 2009 +0000
@@ -395,8 +395,7 @@
 begin
 text:= copy(s, 2, Length(s)-1);
 if CheckNoTeamOrHH
-  or ((CurrentHedgehog^.Gear^.State and gstHHDriven) = 0)
-  or CurrentTeam^.ExtDriven then
+  or ((CurrentHedgehog^.Gear^.State and gstHHDriven) = 0) then
     begin
     chSay(text);
     exit
--- a/hedgewars/uChat.pas	Sun May 24 14:03:59 2009 +0000
+++ b/hedgewars/uChat.pas	Sun May 24 15:01:10 2009 +0000
@@ -135,37 +135,56 @@
 // "Make hedgehog say something"
 if (s[1] = '"') and (s[Length(s)] = '"') then 
     begin
-    ParseCommand('/hogsay '+#1+copy(s, 2, Length(s)-2), true);
+    if CurrentTeam^.ExtDriven then
+        ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
+    else
+        ParseCommand('/hogsay '#1 + copy(s, 2, Length(s)-2), true);
     exit
     end;
 // 'Make hedgehog think something'
 if (s[1] = '''') and (s[Length(s)] = '''') then 
     begin
-    ParseCommand('/hogsay '+#2+copy(s, 2, Length(s)-2), true);
+    if CurrentTeam^.ExtDriven then
+        ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
+    else
+        ParseCommand('/hogsay '#2 + copy(s, 2, Length(s)-2), true);
     exit
     end;
 // -Make hedgehog yell something-
 if (s[1] = '-') and (s[Length(s)] = '-') then 
     begin
-    ParseCommand('/hogsay '+#3+copy(s, 2, Length(s)-2), true);
+    if CurrentTeam^.ExtDriven then
+        ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
+    else
+        ParseCommand('/hogsay '#3 + copy(s, 2, Length(s)-2), true);
     exit
     end;
 // These 3 are same as above, only are to make the hedgehog say it on next attack
 if (s[1] = '/') and (copy(s, 1, 5) = '/hsa ') then
     begin
-    ParseCommand('/hogsay '+#4+copy(s, 6, Length(s)-5), true);
+    if CurrentTeam^.ExtDriven then
+        ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
+    else
+        ParseCommand('/hogsay '#4 + copy(s, 2, Length(s)-2), true);
     exit
     end;
 if (s[1] = '/') and (copy(s, 1, 5) = '/hta ') then
     begin
-    ParseCommand('/hogsay '+#5+copy(s, 6, Length(s)-5), true);
+    if CurrentTeam^.ExtDriven then
+        ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
+    else
+        ParseCommand('/hogsay '#5 + copy(s, 2, Length(s)-2), true);
     exit
     end;
 if (s[1] = '/') and (copy(s, 1, 5) = '/hya ') then
     begin
-    ParseCommand('/hogsay '+#6+copy(s, 6, Length(s)-5), true);
+    if CurrentTeam^.ExtDriven then
+        ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
+    else
+        ParseCommand('/hogsay '#6 + copy(s, 2, Length(s)-2), true);
     exit
     end;
+
 if (s[1] = '/') and (copy(s, 1, 4) <> '/me ') then
 	begin
 	if CurrentTeam^.ExtDriven then exit;