hedgewars/HHHandlers.inc
changeset 534 92fb2b0d5117
parent 528 54fd6924de4e
child 538 74219eadab5e
--- a/hedgewars/HHHandlers.inc	Wed May 30 20:48:57 2007 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Jun 03 17:21:57 2007 +0000
@@ -73,6 +73,7 @@
                     amBlowTorch: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBlowTorch, 0, SignAs(_0_5, dX), _0, 0);
                        amGirder: CurAmmoGear:= AddGear(0, 0, gtGirder, Ammo^[CurSlot, CurAmmo].Pos, _0, _0, 0);
                      amTeleport: CurAmmoGear:= AddGear(0, 0, gtTeleport, 0, _0, _0, 0);
+                       amSwitch: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtSwitcher, 0, _0, _0, 0);
                   end;
         Power:= 0;
         if CurAmmoGear <> nil then
@@ -99,7 +100,7 @@
            else begin
            TurnTimeLeft:= Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].TimeAfterTurn;
            State:= State or gstAttacked;
-           OnUsedAmmo(Ammo)
+           OnUsedAmmo(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog])
            end;
      AttackBar:= 0;
      end