hedgewars/uGearsRender.pas
changeset 15748 ff8bd08f7d98
parent 15747 ed3c5c15dcbd
child 15822 4ede5e84278a
equal deleted inserted replaced
15747:ed3c5c15dcbd 15748:ff8bd08f7d98
   548                     lx:= lx + ax;
   548                     lx:= lx + ax;
   549                     ly:= ly + ay;
   549                     ly:= ly + ay;
   550                     tx:= round(lx);
   550                     tx:= round(lx);
   551                     ty:= round(ly);
   551                     ty:= round(ly);
   552                     // reached top edge of land mask
   552                     // reached top edge of land mask
   553                     if ((ty and LAND_HEIGHT_MASK) <> 0) and (((ty < LAND_HEIGHT) and (ay < 0)) or ((ty >= TopY) and (ay > 0))) and
   553                     if (WorldEdge <> weBounce) and (WorldEdge <> weWrap) and
   554                         (WorldEdge <> weWrap) and (WorldEdge <> weBounce) then
   554                         ((ty and LAND_HEIGHT_MASK) <> 0) and (((ty < LAND_HEIGHT) and (ay < 0)) or ((ty >= TopY) and (ay > 0))) then
   555                         begin
   555                         begin
   556                         // assume infinite beam. Extend it way out past camera
   556                         // assume infinite beam. Extend it way out past camera
   557                         tx:= round(lx + ax * (max(LAND_WIDTH,4096) div 2));
   557                         tx:= round(lx + ax * (max(LAND_WIDTH,4096) div 2));
   558                         ty:= round(ly + ay * (max(LAND_WIDTH,4096) div 2));
   558                         ty:= round(ly + ay * (max(LAND_WIDTH,4096) div 2));
   559                         break;
   559                         break;
   560                         end;
   560                         end;
       
   561                     if ((WorldEdge = weWrap) or (WorldEdge = weBounce)) and (ty < -cCamLimitY) and (ay < 0) then
       
   562                         break;
   561 
   563 
   562                     if ((hogLR < 0) and (tx < LeftX)) or ((hogLR > 0) and (tx >= RightX)) then
   564                     if ((hogLR < 0) and (tx < LeftX)) or ((hogLR > 0) and (tx >= RightX)) then
   563                         if (WorldEdge = weWrap) then
   565                         if (WorldEdge = weWrap) then
   564                             // wrap beam
   566                             // wrap beam
   565                             begin
   567                             begin