hedgewars/uAmmos.pas
changeset 783 4f59db6f147d
parent 553 5478386d935f
child 784 b203147d91b5
--- a/hedgewars/uAmmos.pas	Sun Feb 03 17:02:20 2008 +0000
+++ b/hedgewars/uAmmos.pas	Tue Feb 05 17:53:38 2008 +0000
@@ -29,9 +29,10 @@
 procedure OnUsedAmmo(var Hedgehog: THedgehog);
 procedure ApplyAmmoChanges(var Hedgehog: THedgehog);
 procedure SwitchNotHoldedAmmo(var Hedgehog: THedgehog);
+procedure SetWeapon(weap: TAmmoType);
 
 implementation
-uses uMisc, uGears, uWorld, uLocale;
+uses uMisc, uGears, uWorld, uLocale, uConsole;
 type TAmmoCounts = array[TAmmoType] of Longword;
 var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo;
     StoreCnt: Longword = 0;
@@ -214,4 +215,9 @@
         end
 end;
 
+procedure SetWeapon(weap: TAmmoType);
+begin
+ParseCommand('/setweap ' + chr(ord('a') + byte(weap)), true)
+end;
+
 end.