--- a/hedgewars/GSHandlers.inc Sat May 26 20:22:07 2007 +0000
+++ b/hedgewars/GSHandlers.inc Sat May 26 20:47:36 2007 +0000
@@ -1124,6 +1124,18 @@
end;
////////////////////////////////////////////////////////////////////////////////
+procedure doStepTeleportAfter(Gear: PGear);
+var HHGear: PGear;
+begin
+HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
+HHGear^.Y:= HHGear^.Y + HHGear^.dY;
+HHGear^.dY:= HHGear^.dY + cGravity;
+if TestCollisionYwithGear(HHGear, 1) then
+ begin
+ DeleteGear(Gear);
+ AfterAttack
+ end
+end;
procedure doStepTeleport(Gear: PGear);
var HHGear: PGear;
@@ -1143,10 +1155,10 @@
end
else begin
DeleteCI(HHGear);
+ Gear^.doStep:= @doStepTeleportAfter;
HHGear^.X:= int2hwFloat(TargetPoint.X);
HHGear^.Y:= int2hwFloat(TargetPoint.Y);
- DeleteGear(Gear);
- AfterAttack
+ HHGear^.State:= HHGear^.State or gstFalling
end;
TargetPoint.X:= NoPointX
end;
--- a/hedgewars/HHHandlers.inc Sat May 26 20:22:07 2007 +0000
+++ b/hedgewars/HHHandlers.inc Sat May 26 20:47:36 2007 +0000
@@ -270,6 +270,7 @@
Gear^.State:= Gear^.State and not (gstHHJumping or gstHHHJump);
exit
end;
+
if ((Gear^.State and gstFalling) <> 0) or (StepTicks = cHHStepTicks)
or (CurAmmoGear <> nil) then // we're moving
begin
--- a/hedgewars/uConsts.pas Sat May 26 20:22:07 2007 +0000
+++ b/hedgewars/uConsts.pas Sat May 26 20:47:36 2007 +0000
@@ -650,7 +650,8 @@
(NameId: sidTeleport;
Probability: 400;
NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
+ Ammo: (Propz: ammoprop_ForwMsgs or
+ ammoprop_NoCrosshair or
ammoprop_NeedTarget or
ammoprop_AttackingPut;
Count: 2;