--- a/hedgewars/uGears.pas Sun Jan 21 21:27:07 2007 +0000
+++ b/hedgewars/uGears.pas Sun Jan 21 21:31:10 2007 +0000
@@ -653,7 +653,7 @@
{$IFDEF DEBUGFILE}if Radius > 3 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF}
if (Mask and EXPLDontDraw) = 0 then DrawExplosion(X, Y, Radius);
if Radius = 50 then AddGear(X, Y, gtExplosion, 0, 0, 0, 0);
-if (Mask and EXPLAutoSound)<>0 then PlaySound(sndExplosion, false);
+if (Mask and EXPLAutoSound) <> 0 then PlaySound(sndExplosion, false);
if (Mask and EXPLAllDamageInRadius)=0 then Radius:= Radius shl 1;
Gear:= GearsList;
while Gear <> nil do
@@ -661,17 +661,20 @@
dmg:= Radius - hwRound(Distance(Gear^.X - X, Gear^.Y - Y));
if dmg > 0 then
begin
- dmg:= dmg shr 1;
+ dmg:= dmg div 2;
case Gear^.Kind of
gtHedgehog,
gtMine,
gtCase,
gtFlame: begin
+ {$IFDEF DEBUGFILE}AddFileLog('Damage: ' + inttostr(dmg));{$ENDIF}
if (Mask and EXPLNoDamage) = 0 then inc(Gear^.Damage, dmg);
if ((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog) then
begin
- Gear^.dX:= Gear^.dX + (_0_005 * dmg + cHHKick)* hwSign(Gear^.X - X);
- Gear^.dY:= Gear^.dY + (_0_005 * dmg + cHHKick)* hwSign(Gear^.Y - Y);
+ Gear^.dX:= Gear^.dX + (_0_005 * dmg + cHHKick) * hwSign(Gear^.X - X);
+ addfilelog(' >> _0_005 * dmg = '+floattostr(_0_005 * dmg));
+ addfilelog(' >> dx = '+floattostr(Gear^.dX));
+ Gear^.dY:= Gear^.dY + (_0_005 * dmg + cHHKick) * hwSign(Gear^.Y - Y);
Gear^.Active:= true;
FollowGear:= Gear
end;