hedgewars/VGSHandlers.inc
changeset 3706 a79784328c03
parent 3704 ed2b9c7fb260
child 3751 a70c61c076ae
equal deleted inserted replaced
3704:ed2b9c7fb260 3706:a79784328c03
   112 procedure doStepNote(Gear: PVisualGear; Steps: Longword);
   112 procedure doStepNote(Gear: PVisualGear; Steps: Longword);
   113 begin
   113 begin
   114 Gear^.X:= Gear^.X + Gear^.dX * Steps;
   114 Gear^.X:= Gear^.X + Gear^.dX * Steps;
   115 
   115 
   116 Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
   116 Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
   117 Gear^.dY:= Gear^.dY + cGravityf * Steps;
   117 Gear^.dY:= Gear^.dY + cGravityf * Steps / 2;
   118 
   118 
   119 Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
   119 Gear^.Angle:= Gear^.Angle + (Gear^.Frame + 1) * Steps / 10;
       
   120 while Gear^.Angle > cMaxAngle do
       
   121     Gear^.Angle:= Gear^.Angle - cMaxAngle;
   120 
   122 
   121 if Gear^.FrameTicks <= Steps then
   123 if Gear^.FrameTicks <= Steps then
   122     DeleteVisualGear(Gear)
   124     DeleteVisualGear(Gear)
   123 else
   125 else
   124     dec(Gear^.FrameTicks, Steps)
   126     dec(Gear^.FrameTicks, Steps)