hedgewars/HHHandlers.inc
changeset 5584 e0b9722bd653
parent 5564 4f42009237df
child 5612 2638dec1b323
equal deleted inserted replaced
5583:63b274a4fb01 5584:e0b9722bd653
   549     doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 25, HH^.Hedgehog, EXPLAutoSound + EXPLPoisoned + EXPLNoDamage)
   549     doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 25, HH^.Hedgehog, EXPLAutoSound + EXPLPoisoned + EXPLNoDamage)
   550 else
   550 else
   551 case Gear^.Pos of
   551 case Gear^.Pos of
   552        posCaseUtility,
   552        posCaseUtility,
   553        posCaseAmmo: begin
   553        posCaseAmmo: begin
   554                     a:= Gear^.AmmoType;
   554                     if Gear^.AmmoType <> amNothing then a:= Gear^.AmmoType 
       
   555                     else
       
   556                         begin
       
   557                         for i:= 0 to GameTicks and $7F do GetRandom(2); // Burn some random numbers
       
   558                         if Gear^.Pos = posCaseUtility then a:= GetUtility
       
   559                         else a:= GetAmmo
       
   560                         end;
   555                     AddAmmo(HH^.Hedgehog^, a);
   561                     AddAmmo(HH^.Hedgehog^, a);
   556 // Possibly needs to check shared clan ammo game flag once added.
   562 // Possibly needs to check shared clan ammo game flag once added.
   557 // On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up
   563 // On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up
   558                     if (not (HH^.Hedgehog^.Team^.ExtDriven 
   564                     if (not (HH^.Hedgehog^.Team^.ExtDriven 
   559                       or (HH^.Hedgehog^.BotLevel > 0)))
   565                       or (HH^.Hedgehog^.BotLevel > 0)))