hedgewars/GSHandlers.inc
changeset 3751 a70c61c076ae
parent 3728 9478d13b2f9b
child 3763 2396a2731054
equal deleted inserted replaced
3750:3aa85b5f3318 3751:a70c61c076ae
  1766 ////////////////////////////////////////////////////////////////////////////////
  1766 ////////////////////////////////////////////////////////////////////////////////
  1767 procedure doStepFlame(Gear: PGear);
  1767 procedure doStepFlame(Gear: PGear);
  1768 var 
  1768 var 
  1769     gX,gY,i: LongInt;
  1769     gX,gY,i: LongInt;
  1770     sticky: Boolean;
  1770     sticky: Boolean;
       
  1771     vgt: PVisualGear;
  1771 begin
  1772 begin
  1772     sticky:= (Gear^.State and gsttmpFlag) <> 0;
  1773     sticky:= (Gear^.State and gsttmpFlag) <> 0;
  1773     if not sticky then AllInactive := false;
  1774     if not sticky then AllInactive := false;
  1774 
  1775 
  1775     if not TestCollisionYwithGear(Gear, 1) then
  1776     if not TestCollisionYwithGear(Gear, 1) then
  1776     begin
  1777     begin
  1777         AllInactive := false;
  1778         AllInactive := false;
       
  1779 
       
  1780         if ((GameTicks mod 100) = 0) then
       
  1781             begin
       
  1782             vgt:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFire);
       
  1783             if vgt <> nil then
       
  1784                 begin
       
  1785                 vgt^.dx:= 0;
       
  1786                 vgt^.dy:= 0;
       
  1787                 vgt^.FrameTicks:= 1800 div (Gear^.Tag mod 3 + 2);
       
  1788                 vgt^.State:= gstTmpFlag;
       
  1789                 end;
       
  1790             end;
       
  1791 
       
  1792 
  1778         if Gear^.dX.QWordValue > _0_01.QWordValue then
  1793         if Gear^.dX.QWordValue > _0_01.QWordValue then
  1779             Gear^.dX := Gear^.dX * _0_995;
  1794             Gear^.dX := Gear^.dX * _0_995;
  1780         Gear^.dY := Gear^.dY + cGravity;
  1795         Gear^.dY := Gear^.dY + cGravity;
  1781         // if sticky then Gear^.dY := Gear^.dY + cGravity;
  1796         // if sticky then Gear^.dY := Gear^.dY + cGravity;
  1782         if Gear^.dY.QWordValue > _0_2.QWordValue then Gear^.dY := Gear^.dY * _0_995;
  1797         if Gear^.dY.QWordValue > _0_2.QWordValue then Gear^.dY := Gear^.dY * _0_995;