tint RC plane with team colour. untested.
authornemo
Mon, 17 Oct 2011 13:03:39 -0400
changeset 6138 5cd55ca715b9
parent 6137 f10f1b641f27
child 6139 a912b85e3ece
tint RC plane with team colour. untested.
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsRender.pas	Mon Oct 17 13:01:08 2011 -0400
+++ b/hedgewars/uGearsRender.pas	Mon Oct 17 13:03:39 2011 -0400
@@ -892,10 +892,19 @@
                   else DrawSprite(sprMolotov, x, y, 8);
 
        gtRCPlane: begin
-                  if (Gear^.Tag = -1) then
-                     DrawRotated(sprPlane, x, y, -1,  DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
+                  Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
+                  if Gear^.Tag = -1 then
+                     begin
+                     DrawRotatedF(sprPlane, x, y, 0, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90);
+                     Tint($FF, $FF, $FF, $FF);
+                     DrawRotatedF(sprPlane, x, y, 1, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
+                     end
                   else
-                     DrawRotated(sprPlane, x, y,0,DxDy2Angle(Gear^.dY, Gear^.dX));
+                     begin
+                     DrawRotatedF(sprPlane, x, y, 0, 0,  DxDy2Angle(Gear^.dY, Gear^.dX));
+                     Tint($FF, $FF, $FF, $FF);
+                     DrawRotatedF(sprPlane, x, y, 1, 0,  DxDy2Angle(Gear^.dY, Gear^.dX))
+                     end
                   end;
        gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);