hedgewars/uGearsHandlersMess.pas
changeset 15635 e229d0cacd37
parent 15633 0bf5dda8fa43
child 15639 afeffdb4a712
equal deleted inserted replaced
15634:21dece8f55fe 15635:e229d0cacd37
   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            // This solution is rather ugly, in that it will occassionally suddenly wind physics
   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.
   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
   544            // TODO: Find a way to make gfMoreWind-affected land objects settle more reliably
   545            // and quickler without touching wind itselvs
   545            // and quickler without touching wind itselvs
   546            ((not (Gear^.Kind in [gtMine, gtAirMine, gtSMine, gtKnife, gtExplosives])) or (TimeNotInTurn < MaxMoreWindTime)) and
   546            ((not (Gear^.Kind in [gtMine, gtAirMine, gtSMine, gtKnife, gtExplosives])) or (TimeNotInTurn < MaxMoreWindTime)) then
   547            ((xland or land) = 0) and
       
   548            ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then
       
   549             Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density
   547             Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density
   550         end;
   548         end;
   551 
   549 
   552     Gear^.X := Gear^.X + Gear^.dX;
   550     Gear^.X := Gear^.X + Gear^.dX;
   553     Gear^.Y := Gear^.Y + Gear^.dY;
   551     Gear^.Y := Gear^.Y + Gear^.dY;