hedgewars/uGearsHedgehog.pas
changeset 7347 88685fbb2679
parent 7278 000e4543f204
parent 7339 5984b749ad9b
child 7373 d5ec4e4eb2d5
--- a/hedgewars/uGearsHedgehog.pas	Tue Jun 26 23:29:41 2012 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Fri Jul 06 12:50:18 2012 +0400
@@ -596,7 +596,8 @@
                         else
                             a:= GetAmmo(HH^.Hedgehog)
                         end;
-                    AddAmmo(HH^.Hedgehog^, a);
+                    if Gear^.Power <> 0 then AddAmmo(HH^.Hedgehog^, a, Gear^.Power)
+                    else AddAmmo(HH^.Hedgehog^, a);
 // Possibly needs to check shared clan ammo game flag once added.
 // On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up
                     if (not (HH^.Hedgehog^.Team^.ExtDriven 
@@ -604,7 +605,10 @@
                     or (HH^.Hedgehog^.Team^.Clan^.ClanIndex = LocalClan)
                     or (GameType in [gmtDemo, gmtRecord])  then
                         begin
-                        s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Ammoz[a].NumberInCase) + ')';
+                        if Gear^.Power <> 0 then
+                            s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Gear^.Power) + ')'
+                        else
+                            s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Ammoz[a].NumberInCase) + ')';
                         AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
 
                         // show ammo icon