hedgewars/GSHandlers.inc
changeset 2848 8a1725b4f724
parent 2840 bb9117753fe4
child 2857 768dfbe276a5
--- a/hedgewars/GSHandlers.inc	Tue Feb 23 00:18:57 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Tue Feb 23 00:21:20 2010 +0000
@@ -88,7 +88,10 @@
 end;
 
 procedure CheckHHDamage(Gear: PGear);
-var dmg: Longword;
+var 
+	dmg: Longword;
+	i: LongInt;
+	particle: PVisualGear;
 begin
 if(Gear^.Invulnerable) then exit;
 if _0_4 < Gear^.dY then
@@ -101,7 +104,12 @@
 	else
 		PlaySound(sndOw1, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
 
-    ApplyDamage(Gear, dmg);
+	for i:= min(12, (3 + dmg div 10)) downto 0 do begin
+		particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust);
+		particle^.dX := particle^.dX + (Gear^.dX / 5);
+		end;
+		
+  ApplyDamage(Gear, dmg);
 	end
 end;