--- a/hedgewars/uTeams.pas Sun Sep 24 19:51:16 2006 +0000
+++ b/hedgewars/uTeams.pas Sun Sep 24 21:32:18 2006 +0000
@@ -84,9 +84,10 @@
procedure RecountTeamHealth(team: PTeam);
procedure RestoreTeamsFromSave;
function CheckForWin: boolean;
+procedure SetWeapon(weap: TAmmoType);
implementation
-uses uMisc, uStore, uWorld, uIO, uAI, uLocale;
+uses uMisc, uStore, uWorld, uIO, uAI, uLocale, uConsole;
const MaxTeamHealth: integer = 0;
procedure FreeTeamsList; forward;
@@ -359,6 +360,14 @@
end;
end;
+procedure SetWeapon(weap: TAmmoType);
+begin
+with CurrentTeam^ do
+ with Hedgehogs[CurrHedgehog] do
+ while Ammo[CurSlot, CurAmmo].AmmoType <> weap do
+ ParseCommand('/slot ' + chr(49 + Ammoz[TAmmoType(weap)].Slot));
+end;
+
initialization
finalization