hedgewars/uGearsHedgehog.pas
changeset 10443 42dadeb6e8ae
parent 10435 4c8fc3aa9432
child 10577 5e075da5e0a4
equal deleted inserted replaced
10441:d2f599997b54 10443:42dadeb6e8ae
   116             ammoidx:= i
   116             ammoidx:= i
   117         else ammoidx:= -1
   117         else ammoidx:= -1
   118         end;
   118         end;
   119         if ammoidx >= 0 then
   119         if ammoidx >= 0 then
   120             CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
   120             CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
   121     if (prevAmmo <> CurAmmoType) then
       
   122         begin
       
   123         if CurAmmoType = amKnife then
       
   124             LoadHedgehogHat(HHGear^.Hedgehog^, 'Reserved/chef')
       
   125         else if prevAmmo = amKnife then
       
   126             LoadHedgehogHat(HHGear^.Hedgehog^, Hat);
       
   127         end;
       
   128     // Try again in the next slot
   121     // Try again in the next slot
   129     if (CurAmmoType = prevAmmo) and (slot < cMaxSlotIndex) then
   122     if (CurAmmoType = prevAmmo) and (slot < cMaxSlotIndex) then
   130         begin
   123         begin
   131         inc(slot);
   124         inc(slot);
   132         HHGear^.MsgParam:= slot;
   125         HHGear^.MsgParam:= slot;