hedgewars/uAmmos.pas
changeset 7754 e81dc9bef8b8
parent 7426 55b49cc1f33a
child 8026 4a4f21070479
child 8992 5b0be812dcdb
--- a/hedgewars/uAmmos.pas	Sun Oct 14 00:22:33 2012 +0400
+++ b/hedgewars/uAmmos.pas	Sun Oct 14 13:35:15 2012 -0400
@@ -20,7 +20,7 @@
 
 unit uAmmos;
 interface
-uses uConsts, uTypes;
+uses uConsts, uTypes, uStore;
 
 procedure initModule;
 procedure freeModule;
@@ -277,6 +277,7 @@
                 begin
                 PackAmmo(Ammo, Ammoz[AmmoType].Slot);
                 //SwitchNotHeldAmmo(Hedgehog);
+                if CurAmmoType = amKnife then LoadHedgehogHat(Hedgehog, Hedgehog.Hat);
                 CurAmmoType:= amNothing
                 end
             end
@@ -347,6 +348,7 @@
         end;
     TryDo(slot <= cMaxSlotIndex, 'Ammo slot index overflow', true);
     CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
+    if CurAmmoType = amKnife then LoadHedgehogHat(Hedgehog, 'Reserved/chef')
     end
 end;