try this mikade
authornemo
Mon, 06 Dec 2010 13:07:36 -0500
changeset 4473 b6487d2c15ad
parent 4472 9cf7ec8fdb71
child 4474 499748f6e80f
child 4475 54e78c40970b
try this mikade
hedgewars/GSHandlers.inc
hedgewars/VGSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon Dec 06 08:58:24 2010 -0500
+++ b/hedgewars/GSHandlers.inc	Mon Dec 06 13:07:36 2010 -0500
@@ -3403,7 +3403,7 @@
 
     if (Gear^.State and gstCollision) <> 0 then
     begin
-        doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 11, EXPLPoisoned, $C0E0FFE0);
+        doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 10, EXPLPoisoned, $C0E0FFE0);
         PlaySound(sndEggBreak);
         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg);
         vg := AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg);
--- a/hedgewars/VGSHandlers.inc	Mon Dec 06 08:58:24 2010 -0500
+++ b/hedgewars/VGSHandlers.inc	Mon Dec 06 13:07:36 2010 -0500
@@ -558,11 +558,16 @@
 
 procedure doStepExplosion(Gear: PVisualGear; Steps: Longword);
 var i: LongWord;
-gX,gY: LongInt;
+    gX,gY: LongInt;
+    vg: PVisualGear;
 begin
 gX:= round(Gear^.X);
 gY:= round(Gear^.Y);
-for i:= 0 to 31 do AddVisualGear(gX, gY, vgtFire);
+for i:= 0 to 31 do 
+    begin
+    vg:= AddVisualGear(gX, gY, vgtFire);
+    if vg <> nil then vg^.State:= 1;
+    end;
 for i:= 0 to  8 do AddVisualGear(gX, gY, vgtExplPart);
 for i:= 0 to  8 do AddVisualGear(gX, gY, vgtExplPart2);
 Gear^.doStep:= @doStepExplosionWork;
@@ -590,12 +595,17 @@
 
 procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
 var i: LongWord;
-gX,gY: LongInt;
+    gX,gY: LongInt;
+    vg: PVisualGear;
 begin
 gX:= round(Gear^.X);
 gY:= round(Gear^.Y);
 AddVisualGear(gX, gY, vgtSmokeRing);
-for i:= 0 to 46 do AddVisualGear(gX, gY, vgtFire);
+for i:= 0 to 46 do 
+    begin
+    vg:= AddVisualGear(gX, gY, vgtFire);
+    if vg <> nil then vg^.State:= 1;
+    end;
 for i:= 0 to 15 do AddVisualGear(gX, gY, vgtExplPart);
 for i:= 0 to 15 do AddVisualGear(gX, gY, vgtExplPart2);
 Gear^.doStep:= @doStepBigExplosionWork;