equal
deleted
inserted
replaced
2716 procedure doStepBirdyFly(Gear: PGear); |
2716 procedure doStepBirdyFly(Gear: PGear); |
2717 var HHGear: PGear; |
2717 var HHGear: PGear; |
2718 fuel: LongInt; |
2718 fuel: LongInt; |
2719 move: hwFloat; |
2719 move: hwFloat; |
2720 begin |
2720 begin |
2721 HHGear:=PHedgehog(Gear^.Hedgehog)^.Gear; |
2721 HHGear:= CurrentHedgehog^.Gear; |
2722 |
2722 |
2723 move:= _0_1; |
2723 move:= _0_1; |
2724 fuel:= 50; |
2724 fuel:= 50; |
2725 |
2725 |
2726 if Gear^.Pos > 0 then |
2726 if Gear^.Pos > 0 then |
2788 |
2788 |
2789 //////////////////////////////////////////////////////////////////////////////// |
2789 //////////////////////////////////////////////////////////////////////////////// |
2790 procedure doStepBirdyDescend(Gear: PGear); |
2790 procedure doStepBirdyDescend(Gear: PGear); |
2791 var HHGear: PGear; |
2791 var HHGear: PGear; |
2792 begin |
2792 begin |
2793 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
|
2794 AllInactive:= false; |
2793 AllInactive:= false; |
2795 if Gear^.Timer > 0 then |
2794 if Gear^.Timer > 0 then |
2796 dec(Gear^.Timer, 1) |
2795 dec(Gear^.Timer, 1) |
2797 else if CurrentHedgehog = nil then |
2796 else if CurrentHedgehog = nil then |
2798 begin |
2797 begin |
2799 Gear^.doStep:= @doStepBirdyVanish; |
2798 Gear^.doStep:= @doStepBirdyVanish; |
2800 end; |
2799 exit |
|
2800 end; |
|
2801 HHGear:= CurrentHedgehog^.Gear; |
2801 HHGear^.Message:= HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right); |
2802 HHGear^.Message:= HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right); |
2802 if abs(hwRound(HHGear^.Y - Gear^.Y)) > 32 then |
2803 if abs(hwRound(HHGear^.Y - Gear^.Y)) > 32 then |
2803 begin |
2804 begin |
2804 if Gear^.Pos = 0 then |
2805 if Gear^.Timer = 0 then |
2805 Gear^.Y:= Gear^.Y + _0_1 |
2806 Gear^.Y:= Gear^.Y + _0_1 |
2806 end |
2807 end |
2807 else |
2808 else if Gear^.Timer = 0 then |
2808 begin |
2809 begin |
2809 Gear^.doStep:= @doStepBirdyFly; |
2810 Gear^.doStep:= @doStepBirdyFly; |
2810 HHGear^.dY:= -_0_2 |
2811 HHGear^.dY:= -_0_2 |
2811 end |
2812 end |
2812 end; |
2813 end; |
2814 //////////////////////////////////////////////////////////////////////////////// |
2815 //////////////////////////////////////////////////////////////////////////////// |
2815 procedure doStepBirdy(Gear: PGear); |
2816 procedure doStepBirdy(Gear: PGear); |
2816 var HHGear: PGear; |
2817 var HHGear: PGear; |
2817 begin |
2818 begin |
2818 Gear^.doStep:= @doStepBirdyDescend; |
2819 Gear^.doStep:= @doStepBirdyDescend; |
2819 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
2820 if CurrentHedgehog = nil then |
|
2821 begin |
|
2822 DeleteGear(Gear); |
|
2823 exit |
|
2824 end; |
|
2825 |
|
2826 HHGear:= CurrentHedgehog^.Gear; |
|
2827 |
2820 if HHGear^.dX.isNegative then |
2828 if HHGear^.dX.isNegative then |
2821 Gear^.Tag:= -1 |
2829 Gear^.Tag:= -1 |
2822 else |
2830 else |
2823 Gear^.Tag:= 1; |
2831 Gear^.Tag:= 1; |
2824 Gear^.Pos:= 0; |
2832 Gear^.Pos:= 0; |