hedgewars/CCHandlers.inc
changeset 3637 0db298524c3d
parent 3611 ed00aa2b339e
child 3638 33ee433749ba
--- a/hedgewars/CCHandlers.inc	Sat Jul 10 18:43:28 2010 +0200
+++ b/hedgewars/CCHandlers.inc	Sun Jul 11 03:23:26 2010 +0200
@@ -499,17 +499,21 @@
 
 procedure chSetWeapon(var s: shortstring);
 begin
-if (s[0] <> #1) or CheckNoTeamOrHH then exit;
+    if (s[0] <> #1) or CheckNoTeamOrHH then exit;
 
-if TAmmoType(s[1]) > High(TAmmoType) then exit;
+    if TAmmoType(s[1]) > High(TAmmoType) then exit;
 
-if not CurrentTeam^.ExtDriven then SendIPC('w' + s);
+    if not CurrentTeam^.ExtDriven then SendIPC('w' + s);
 
-with CurrentHedgehog^.Gear^ do
+    with CurrentHedgehog^.Gear^ do
     begin
-    Message:= Message or gm_Weapon;
-    MsgParam:= byte(s[1])
-    end
+        Message:= Message or gm_Weapon;
+        MsgParam:= byte(s[1]);
+    end;
+    
+{$IFDEF IPHONEOS}
+    savedAmmoType:= TAmmoType(s[1]);
+{$ENDIF}
 end;
 
 procedure chTaunt(var s: shortstring);