hedgewars/uGearsUtils.pas
changeset 10274 07adc8b6288c
parent 10272 31ee88c9b4d0
child 10354 56bd029245fc
equal deleted inserted replaced
10273:99032c5be7ba 10274:07adc8b6288c
   652                         (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask) <> 0));
   652                         (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask) <> 0));
   653 
   653 
   654                 if (y - sy > Gear^.Radius * 2) and (y < cWaterLine)
   654                 if (y - sy > Gear^.Radius * 2) and (y < cWaterLine)
   655                     and (((Gear^.Kind = gtExplosives)
   655                     and (((Gear^.Kind = gtExplosives)
   656                         and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 60, 60))
   656                         and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 60, 60))
   657                         and (isSteadyPosition(x, y+1, Gear^.Radius - 1, 3, $FFFF)))
   657                         and (isSteadyPosition(x, y+1, Gear^.Radius - 1, 3, $FFFF)
       
   658                          or (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1, $FFFF) > Gear^.Radius)
       
   659                             ))
   658                     or
   660                     or
   659                         ((Gear^.Kind <> gtExplosives)
   661                         ((Gear^.Kind <> gtExplosives)
   660                         and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 110, 110))
   662                         and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 110, 110))
   661                         )) then
   663                         )) then
   662                     begin
   664                     begin