hedgewars/uGearsHandlersMess.pas
changeset 15597 6e72bd61002e
parent 15596 3409433a236a
child 15598 d275bb6b85b4
equal deleted inserted replaced
15596:3409433a236a 15597:6e72bd61002e
   537         begin
   537         begin
   538         // Apply gravity and wind
   538         // Apply gravity and wind
   539         Gear^.dY := Gear^.dY + cGravity;
   539         Gear^.dY := Gear^.dY + cGravity;
   540         if ((GameFlags and gfMoreWind) <> 0) and
   540         if ((GameFlags and gfMoreWind) <> 0) and
   541            // Disable gfMoreWind for land objects on turn end to prevent bouncing them forever
   541            // Disable gfMoreWind for land objects on turn end to prevent bouncing them forever
   542            ((not (Gear^.Kind in [gtMine, gtAirMine, gtSMine, gtKnife, gtExplosives])) or (TurnTimeLeft > 0)) and
   542            // This solution is rather ugly, in that it will occassionally suddenly wind physics
       
   543            // while a gear is moving, this can be rather confusing.
       
   544            // TODO: Find a way to make gfMoreWind-affected land objects settle more reliably
       
   545            // and quickler without touching wind itselvs
       
   546            ((not (Gear^.Kind in [gtMine, gtAirMine, gtSMine, gtKnife, gtExplosives])) or (TimeNotInTurn < MaxMoreWindTime)) and
   543            ((xland or land) = 0) and
   547            ((xland or land) = 0) and
   544            ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then
   548            ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then
   545             Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density
   549             Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density
   546         end;
   550         end;
   547 
   551