real droplet fix - default density is fine - also add back in the underwater bullet trails
authornemo
Wed, 02 May 2018 15:29:21 -0400
changeset 13362 030b085b182f
parent 13361 ced5dc3079a3
child 13363 a79c1206bacd
real droplet fix - default density is fine - also add back in the underwater bullet trails
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsList.pas
--- a/hedgewars/uGearsHandlersMess.pas	Wed May 02 20:09:48 2018 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Wed May 02 15:29:21 2018 -0400
@@ -1397,11 +1397,11 @@
 
         CheckGearDrowning(Gear);
         case Gear^.Kind of
-            gtMinigunBullet: isDead:= isDigging;
-            gtDEagleShot, gtSniperRifleShot: isDead:= Gear^.Damage >= Gear^.Health;
+            gtMinigunBullet: isDead:= isDigging or ((Gear^.State and gstDrowning) <> 0);
+            gtDEagleShot, gtSniperRifleShot: isDead:= (Gear^.Damage >= Gear^.Health) or ((Gear^.State and gstDrowning) <> 0)
         end;
         dec(i)
-    until (i = 0) or (isDead) or ((Gear^.State and gstDrowning) <> 0);
+    until (i = 0) or (isDead);
 
     LineShoveHelp(Gear, oX, oY, Gear^.X, Gear^.Y,
                   Gear^.dX, Gear^.dY, iInit + 2 - i);
@@ -1411,7 +1411,11 @@
         // draw bubbles
         if (not SuddenDeathDmg and (WaterOpacity < $FF)) or (SuddenDeathDmg and (SDWaterOpacity < $FF)) then
             begin
-            for i:=(Gear^.Health * 4) downto 0 do
+			case Gear^.Kind of
+				gtMinigunBullet: iInit:= Gear^.Health * 100;
+				gtDEagleShot, gtSniperRifleShot: iInit:= Gear^.Health * 4
+				end;
+            for i:=iInit downto 0 do
                 begin
                 if Random(6) = 0 then
                     AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble);
--- a/hedgewars/uGearsList.pas	Wed May 02 20:09:48 2018 +0200
+++ b/hedgewars/uGearsList.pas	Wed May 02 15:29:21 2018 -0400
@@ -757,7 +757,6 @@
  gtMinigunBullet: begin
                 gear^.Radius:= 1;
                 gear^.Health:= 2;
-                gear^.Density:= _0_3;
                 end;
 gtGenericFaller:begin
                 gear^.AdvBounce:= 1;