hedgewars/HHHandlers.inc
changeset 295 8834f3cb620e
parent 285 cdab49768c83
child 300 be94799f33d2
--- a/hedgewars/HHHandlers.inc	Sun Dec 10 12:09:32 2006 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Dec 10 15:55:53 2006 +0000
@@ -104,11 +104,22 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 procedure PickUp(HH, Gear: PGear);
+var s: shortstring;
+    a: TAmmoType;
 begin
 Gear.Message:= gm_Destroy;
 case Gear.Pos of
+       posCaseAmmo: begin
+                    a:= TAmmoType(Gear.State);
+                    AddAmmo(PHedgehog(HH.Hedgehog), a);
+                    s:= trammo[Ammoz[a].NameId];
+                    AddCaption(s, PHedgehog(HH.Hedgehog).Team.Color, capgrpAmmoinfo);
+                    end;
      posCaseHealth: begin
                     inc(HH.Health, Gear.Health);
+                    str(Gear.Health, s);
+                    s:= '+' + s;
+                    AddCaption(s, PHedgehog(HH.Hedgehog).Team.Color, capgrpAmmoinfo);
                     RenderHealth(PHedgehog(HH.Hedgehog)^);
                     RecountTeamHealth(PHedgehog(HH.Hedgehog)^.Team)
                     end;