hedgewars/uWorld.pas
changeset 13636 fc8c8910a281
parent 13635 571f8110957e
child 13637 28e4a9db4690
--- a/hedgewars/uWorld.pas	Wed Aug 08 11:26:33 2018 +0200
+++ b/hedgewars/uWorld.pas	Wed Aug 08 11:40:00 2018 +0200
@@ -1403,19 +1403,32 @@
 
     DrawVisualGears(3, false);
 
-{$WARNINGS OFF}
 // Target
 if (TargetPoint.X <> NoPointX) and (CurrentTeam <> nil) and (CurrentHedgehog <> nil) then
     begin
     with PHedgehog(CurrentHedgehog)^ do
         begin
         if CurAmmoType = amBee then
-            DrawSpriteRotatedF(sprTargetBee, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360)
+            spr:= sprTargetBee
         else
-            DrawSpriteRotatedF(sprTargetP, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360)
-        end
+            spr:= sprTargetP;
+        if replicateToLeft then
+            begin
+            ShiftWorld(-1);
+            DrawSpriteRotatedF(spr, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
+            UnshiftWorld();
+            end;
+
+        if replicateToRight then
+            begin
+            ShiftWorld(1);
+            DrawSpriteRotatedF(spr, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
+            UnshiftWorld();
+            end;
+
+        DrawSpriteRotatedF(spr, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
+        end;
     end;
-{$WARNINGS ON}
 
 RenderWorldEdge();