hedgewars/uGearsRender.pas
changeset 14557 05b929808585
parent 14400 f39d34d78028
child 14558 5ae97eab70eb
--- a/hedgewars/uGearsRender.pas	Fri Jan 11 01:44:04 2019 +0100
+++ b/hedgewars/uGearsRender.pas	Fri Jan 11 03:50:06 2019 +0100
@@ -279,6 +279,11 @@
         begin
         case CurAmmoGear^.Kind of
             gtJetpack:      begin
+                            // render jetpack contour if underwater
+                            if (((not SuddenDeathDmg) and (WaterOpacity > 179)) or (SuddenDeathDmg and (SDWaterOpacity > 179))) and
+                                    ((cWaterLine < (hwRound(Gear^.Y) + Gear^.Radius - 16)) or
+                                    ((WorldEdge = weSea) and ((hwRound(Gear^.X) < LeftX) or (hwRound(Gear^.X) > RightX)))) then
+                                DrawSprite(sprJetpack, sx-32, sy-32, 4);
                             if CurAmmoGear^.Tex <> nil then
                                 DrawTextureCentered(sx, sy - 40, CurAmmoGear^.Tex);
                             DrawAltWeapon(Gear, sx, sy);