hm. I think I forgot to commit this when adding speech bubble change
authornemo
Thu, 20 Mar 2014 13:12:05 -0400
changeset 10210 1a6b9a98147c
parent 10209 76316652ef26
child 10220 05be26df1242
hm. I think I forgot to commit this when adding speech bubble change
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Thu Mar 20 17:14:25 2014 +0400
+++ b/hedgewars/uScript.pas	Thu Mar 20 13:12:05 2014 -0400
@@ -1077,13 +1077,18 @@
             vgear:= AddVisualGear(0, 0, vgtSpeechBubble, s, true);
             if vgear <> nil then
                begin
+               if Gear^.Kind = gtHedgehog then
+                   begin
+                   AddChatString(#1+'[' + gear^.Hedgehog^.Name + '] '+vgear^.text);
+                   vgear^.Hedgehog:= gear^.Hedgehog
+                   end
+               else vgear^.Frame:= gear^.uid;
+
                vgear^.Text:= lua_tostring(L, 2);
-               vgear^.Hedgehog:= gear^.Hedgehog;
                vgear^.FrameTicks:= lua_tointeger(L, 3);
                if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then
                    vgear^.FrameTicks:= 1;
                lua_pushinteger(L, vgear^.Uid);
-               AddChatString(#1+'[' + gear^.Hedgehog^.Name + '] '+vgear^.text)
                end
             end
             else