Render contour of flying saucer is in (mostly) opaque
authorWuzzy <Wuzzy2@mail.ru>
Fri, 11 Jan 2019 03:50:06 +0100
changeset 14557 05b929808585
parent 14556 1c623169a44d
child 14558 5ae97eab70eb
Render contour of flying saucer is in (mostly) opaque
ChangeLog.txt
hedgewars/uGearsRender.pas
share/hedgewars/Data/Graphics/Hedgehog/amJetpack.png
--- a/ChangeLog.txt	Fri Jan 11 01:44:04 2019 +0100
+++ b/ChangeLog.txt	Fri Jan 11 03:50:06 2019 +0100
@@ -28,6 +28,7 @@
  + New chat command: “/help room” (shows room chat commands within the game)
 
 Graphics:
+ + Show contour of flying saucer when in highly opaque water
  * Fix double water splash when flying saucer drowns
 
 Game HUD:
--- 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);
Binary file share/hedgewars/Data/Graphics/Hedgehog/amJetpack.png has changed