--- a/hedgewars/uGearsRender.pas Wed Sep 02 00:39:35 2015 +0200
+++ b/hedgewars/uGearsRender.pas Wed Sep 02 01:25:29 2015 +0200
@@ -746,32 +746,39 @@
amRubber,
amGirder: begin
DrawSpriteRotated(sprHandConstruction, hx, hy, sign, aangle);
- if WorldEdge = weWrap then
+ if cBuildMaxDist = cDefaultBuildMaxDist then
begin
- if hwRound(Gear^.X) < LongInt(leftX) + 256 then
- DrawSpriteClipped(sprGirder,
- rightX+(ox-leftX)-256,
- oy-256,
- LongInt(topY)+WorldDy,
- LongInt(rightX)+WorldDx,
- cWaterLine+WorldDy,
- LongInt(leftX)+WorldDx);
- if hwRound(Gear^.X) > LongInt(rightX) - 256 then
- DrawSpriteClipped(sprGirder,
- leftX-(rightX-ox)-256,
- oy-256,
- LongInt(topY)+WorldDy,
- LongInt(rightX)+WorldDx,
- cWaterLine+WorldDy,
- LongInt(leftX)+WorldDx)
+ if WorldEdge = weWrap then
+ begin
+ if hwRound(Gear^.X) < LongInt(leftX) + 256 then
+ DrawSpriteClipped(sprGirder,
+ rightX+(ox-leftX)-256,
+ oy-256,
+ LongInt(topY)+WorldDy,
+ LongInt(rightX)+WorldDx,
+ cWaterLine+WorldDy,
+ LongInt(leftX)+WorldDx);
+ if hwRound(Gear^.X) > LongInt(rightX) - 256 then
+ DrawSpriteClipped(sprGirder,
+ leftX-(rightX-ox)-256,
+ oy-256,
+ LongInt(topY)+WorldDy,
+ LongInt(rightX)+WorldDx,
+ cWaterLine+WorldDy,
+ LongInt(leftX)+WorldDx)
+ end;
+ DrawSpriteClipped(sprGirder,
+ ox-256,
+ oy-256,
+ LongInt(topY)+WorldDy,
+ LongInt(rightX)+WorldDx,
+ cWaterLine+WorldDy,
+ LongInt(leftX)+WorldDx)
+ end
+ else if cBuildMaxDist > 0 then
+ begin
+ DrawCircle(hx, hy, cBuildMaxDist, 3, $FF, 0, 0, $80);
end;
- DrawSpriteClipped(sprGirder,
- ox-256,
- oy-256,
- LongInt(topY)+WorldDy,
- LongInt(rightX)+WorldDx,
- cWaterLine+WorldDy,
- LongInt(leftX)+WorldDx)
end;
amBee: DrawSpriteRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
amFlamethrower: DrawSpriteRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle);