hedgewars/uGears.pas
changeset 3689 e2be39ee19f0
parent 3682 45b416c5b976
child 3697 d5b30d6373fc
--- a/hedgewars/uGears.pas	Fri Jul 30 12:07:30 2010 -0400
+++ b/hedgewars/uGears.pas	Fri Jul 30 18:20:42 2010 +0200
@@ -1177,6 +1177,7 @@
     dmg, dmgRadius, dmgBase: LongInt;
     fX, fY: hwFloat;
     vg: PVisualGear;
+    i, cnt: LongInt;
 begin
 TargetPoint.X:= NoPointX;
 {$IFDEF DEBUGFILE}if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF}
@@ -1261,7 +1262,13 @@
     end;
 
 if (Mask and EXPLDontDraw) = 0 then
-    if (GameFlags and gfSolidLand) = 0 then DrawExplosion(X, Y, Radius);
+    if (GameFlags and gfSolidLand) = 0 then
+        begin
+        cnt:= DrawExplosion(X, Y, Radius) div 1608; // approx 2 16x16 circles to erase per chunk
+        if cnt > 0 then
+            for i:= 0 to cnt do
+                AddVisualGear(X, Y, vgtChunk)
+        end;
 
 uAIMisc.AwareOfExplosion(0, 0, 0)
 end;