fix hsa/hta/hya
authornemo
Sun, 05 Dec 2010 23:58:15 -0500
changeset 4468 0758b19bc99b
parent 4467 adedeec8f18f
child 4469 b08c7ebcadb2
fix hsa/hta/hya
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sun Dec 05 23:50:04 2010 -0500
+++ b/hedgewars/uGears.pas	Sun Dec 05 23:58:15 2010 -0500
@@ -1755,9 +1755,11 @@
     t:= byte(s[2]);  // team
     h:= byte(s[3]);  // target hog
     // allow targetting a hog by specifying a number as the first portion of the text
-    if (h > byte('0')) and (h < byte('9')) then i:= h - 48;
+    if (x < 4) and (h > byte('0')) and (h < byte('9')) then i:= h - 48;
     if i <> 0 then text:= copy(s, 4, Length(s) - 1)
-    else text:= copy(s, 3, Length(s) - 1);
+    else if x < 4 then text:= copy(s, 3, Length(s) - 1)
+    else text:= copy(s, 2, Length(s) - 1);
+
     if CheckNoTeamOrHH then
         begin
         ParseCommand('say ' + text, true);