hedgewars/GSHandlers.inc
changeset 6154 72c6239a7cc6
parent 6131 4e8816cf9459
child 6155 930c3be58e1e
equal deleted inserted replaced
6153:3881126e06e8 6154:72c6239a7cc6
  3694 var 
  3694 var 
  3695     HHGear: PGear;
  3695     HHGear: PGear;
  3696     fuel, i: LongInt;
  3696     fuel, i: LongInt;
  3697     move: hwFloat;
  3697     move: hwFloat;
  3698 begin
  3698 begin
  3699     HHGear := CurrentHedgehog^.Gear;
  3699     HHGear := Gear^.Hedgehog^.Gear;
       
  3700     if HHGear = nil then 
       
  3701         begin
       
  3702         DeleteGear(Gear);
       
  3703         exit
       
  3704         end;
  3700 
  3705 
  3701     move := _0_2;
  3706     move := _0_2;
  3702     fuel := 50;
  3707     fuel := 50;
  3703 
  3708 
  3704     if Gear^.Pos > 0 then
  3709     if Gear^.Pos > 0 then
  3786 var 
  3791 var 
  3787     HHGear: PGear;
  3792     HHGear: PGear;
  3788 begin
  3793 begin
  3789     if Gear^.Timer > 0 then
  3794     if Gear^.Timer > 0 then
  3790         dec(Gear^.Timer, 1)
  3795         dec(Gear^.Timer, 1)
  3791     else if CurrentHedgehog = nil then
  3796     else if Gear^.Hedgehog^.Gear = nil then
  3792         begin
  3797         begin
  3793             DeleteGear(Gear);
  3798             DeleteGear(Gear);
  3794             AfterAttack;
  3799             AfterAttack;
  3795             exit
  3800             exit
  3796         end;
  3801         end;
  3797     HHGear := CurrentHedgehog^.Gear;
  3802     HHGear := Gear^.Hedgehog^.Gear;
  3798     HHGear^.Message := HHGear^.Message and not (gmUp or gmPrecise or gmLeft or gmRight);
  3803     HHGear^.Message := HHGear^.Message and not (gmUp or gmPrecise or gmLeft or gmRight);
  3799     if abs(hwRound(HHGear^.Y - Gear^.Y)) > 32 then
  3804     if abs(hwRound(HHGear^.Y - Gear^.Y)) > 32 then
  3800     begin
  3805     begin
  3801         if Gear^.Timer = 0 then
  3806         if Gear^.Timer = 0 then
  3802             Gear^.Y := Gear^.Y + _0_1
  3807             Gear^.Y := Gear^.Y + _0_1