hedgewars/uVisualGears.pas
changeset 9764 8dc9d268330f
parent 9762 938d1c08d0d1
child 9768 08799c901a42
--- a/hedgewars/uVisualGears.pas	Sat Dec 07 21:41:34 2013 -0500
+++ b/hedgewars/uVisualGears.pas	Sat Dec 07 22:09:55 2013 -0500
@@ -247,16 +247,14 @@
                              else
                                  DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);*)
                vgtSpeechBubble: begin
-                                if (Gear^.Tex <> nil) and (Gear^.State <= 2) then
+                                if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
                                     begin
-                                    // make speech bubbles of inactive teams' hogs transparent
-                                    if ((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1) then
-                                        begin
-                                        tinted:= true;
-                                        Tint($FF, $FF, $FF,  $66);
-                                        end;
-                                    DrawTextureCentered(round(Gear^.X), round(Gear^.Y), Gear^.Tex);
-                                    end;
+                                    tinted:= true;
+                                    Tint($FF, $FF, $FF,  $66);
+                                    DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
+                                    end
+                                else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then
+                                    DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
                                 end;
                vgtSmallDamageTag: DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
                vgtHealthTag: if Gear^.Tex <> nil then