hedgewars/HHHandlers.inc
changeset 3682 45b416c5b976
parent 3485 ab91c56a9050
child 3710 411f5c2b5292
--- a/hedgewars/HHHandlers.inc	Mon Jul 26 13:05:07 2010 +0200
+++ b/hedgewars/HHHandlers.inc	Thu Jul 29 13:43:57 2010 +0200
@@ -17,6 +17,29 @@
  *)
 
 ////////////////////////////////////////////////////////////////////////////////
+
+procedure HHHurt(Hedgehog: PHedgehog; Source: TDamageSource);
+begin
+if (Source = dsFall) or (Source = dsExplosion) then
+    case random(3) of
+        0: PlaySound(sndOoff1, Hedgehog^.Team^.voicepack);
+        1: PlaySound(sndOoff2, Hedgehog^.Team^.voicepack);
+        2: PlaySound(sndOoff3, Hedgehog^.Team^.voicepack);
+    end
+else if (Source = dsPoison) then
+    case random(2) of
+        0: PlaySound(sndPoisonCough, Hedgehog^.Team^.voicepack);
+        1: PlaySound(sndPoisonMoan, Hedgehog^.Team^.voicepack);
+    end
+else
+    case random(4) of
+        0: PlaySound(sndOw1, Hedgehog^.Team^.voicepack);
+        1: PlaySound(sndOw2, Hedgehog^.Team^.voicepack);
+        2: PlaySound(sndOw3, Hedgehog^.Team^.voicepack);
+        3: PlaySound(sndOw4, Hedgehog^.Team^.voicepack);
+    end
+end;
+
 procedure ChangeAmmo(Gear: PGear);
 var slot, i: Longword;
 begin