equal
deleted
inserted
replaced
2709 sticky: Boolean; |
2709 sticky: Boolean; |
2710 vgt: PVisualGear; |
2710 vgt: PVisualGear; |
2711 tdX,tdY, f: HWFloat; |
2711 tdX,tdY, f: HWFloat; |
2712 landPixel: Word; |
2712 landPixel: Word; |
2713 begin |
2713 begin |
2714 // don't bounce |
2714 WorldWrap(Gear); |
2715 if WorldEdge <> weBounce then |
|
2716 WorldWrap(Gear); |
|
2717 if Gear^.FlightTime > 0 then dec(Gear^.FlightTime); |
2715 if Gear^.FlightTime > 0 then dec(Gear^.FlightTime); |
2718 // There are 2 flame types: normal and sticky |
2716 // There are 2 flame types: normal and sticky |
2719 sticky:= (Gear^.State and gsttmpFlag) <> 0; |
2717 sticky:= (Gear^.State and gsttmpFlag) <> 0; |
2720 if not sticky then AllInactive := false; |
2718 if not sticky then AllInactive := false; |
2721 |
2719 |
2771 Gear^.dY := Gear^.dY + cGravity; |
2769 Gear^.dY := Gear^.dY + cGravity; |
2772 |
2770 |
2773 if Gear^.dY.QWordValue > _0_2.QWordValue then |
2771 if Gear^.dY.QWordValue > _0_2.QWordValue then |
2774 Gear^.dY := Gear^.dY * _0_995; |
2772 Gear^.dY := Gear^.dY * _0_995; |
2775 |
2773 |
2776 Gear^.X := Gear^.X + Gear^.dX + cWindSpeed * 640; |
2774 // Apply speed changes |
|
2775 |
|
2776 tdX:= Gear^.dX + cWindSpeed * 640; |
|
2777 // Don't apply wind speed if moving against bounce world edge |
|
2778 if (WorldEdge = weBounce) and |
|
2779 (((hwRound(Gear^.X + tdX) - Gear^.Radius < leftX) and (hwSign(tdX) = -1)) or |
|
2780 ((hwRound(Gear^.X + tdX) + Gear^.Radius > rightX) and (hwSign(tdX) = 1))) then |
|
2781 Gear^.X := Gear^.X + Gear^.dX |
|
2782 else |
|
2783 // Apply dX and wind speed |
|
2784 Gear^.X := Gear^.X + tdX; |
|
2785 |
2777 Gear^.Y := Gear^.Y + Gear^.dY; |
2786 Gear^.Y := Gear^.Y + Gear^.dY; |
2778 end; |
2787 end; |
2779 |
2788 |
2780 gX := hwRound(Gear^.X); |
2789 gX := hwRound(Gear^.X); |
2781 gY := hwRound(Gear^.Y); |
2790 gY := hwRound(Gear^.Y); |