--- a/hedgewars/uGearsUtils.pas Sun Feb 15 21:27:27 2015 -0500
+++ b/hedgewars/uGearsUtils.pas Mon Feb 16 13:58:32 2015 -0500
@@ -82,6 +82,7 @@
vg: PVisualGear;
i, cnt: LongInt;
wrap: boolean;
+ bubble: PVisualGear;
begin
if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');
if Radius > 25 then KickFlakes(Radius, X, Y);
@@ -89,7 +90,17 @@
if ((Mask and EXPLNoGfx) = 0) then
begin
vg:= nil;
- if Radius > 50 then vg:= AddVisualGear(X, Y, vgtBigExplosion)
+ if CheckCoordInWater(X, Y - Radius) then
+ begin
+ cnt:= 2 * Radius;
+ for i:= (Radius * Radius) div 4 downto 0 do
+ begin
+ bubble := AddVisualGear(X - Radius + random(cnt), Y - Radius + random(cnt), vgtBubble);
+ if bubble <> nil then
+ bubble^.dY:= 0.1 + random(20)/10;
+ end
+ end
+ else if Radius > 50 then vg:= AddVisualGear(X, Y, vgtBigExplosion)
else if Radius > 10 then vg:= AddVisualGear(X, Y, vgtExplosion);
if vg <> nil then
vg^.Tint:= Tint;