hedgewars/uAmmos.pas
changeset 2767 77c030ac978e
parent 2766 aa3120a9e22c
child 2769 82bfcc006afb
equal deleted inserted replaced
2766:aa3120a9e22c 2767:77c030ac978e
    70     else if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then 
    70     else if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then 
    71        begin
    71        begin
    72        TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
    72        TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
    73        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;
    73        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;
    74 
    74 
    75        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= 0;
    75        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE;
    76        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0;
    76        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0;
    77 
    77 
    78        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE;
       
    79        inc(mi[Ammoz[a].Slot])
    78        inc(mi[Ammoz[a].Slot])
    80        end
    79        end
    81     end
    80     end
    82 end;
    81 end;
    83 
    82