hedgewars/HHHandlers.inc
changeset 15 6200cca92480
parent 7 b472e4b1a106
child 16 b6f4b413dd41
--- a/hedgewars/HHHandlers.inc	Fri Sep 09 21:45:31 2005 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Sep 11 11:45:01 2005 +0000
@@ -35,6 +35,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepHedgehogDriven(Gear: PGear);
 const StepTicks: LongWord = 0;
+var t: PGear;
 begin
 if isinMultiShoot and (Gear.Damage = 0) then exit;
 AllInactive:= false;
@@ -47,6 +48,14 @@
       Gear.State:= Gear.State and not gstHHJumping;
    exit
    end;
+   
+// check for case with ammo
+t:= CheckGearNear(Gear, gtCase, 25, 25);
+if t <> nil then
+   begin
+   t.Message:= gm_Destroy;
+   ; // take ammo from it
+   end;
 
 if CurAmmoGear <> nil then
    begin