hedgewars/uWorld.pas
changeset 15908 014f4edd0421
parent 15857 f0f615dcbe7c
--- a/hedgewars/uWorld.pas	Thu Oct 06 20:58:54 2022 +0300
+++ b/hedgewars/uWorld.pas	Sun Oct 16 13:14:16 2022 +0300
@@ -65,6 +65,7 @@
     , uTeams
     , uDebug
     , uInputHandler
+    , uDrawing
 {$IFDEF USE_VIDEO_RECORDING}
     , uVideoRec
 {$ENDIF}
@@ -1925,6 +1926,9 @@
     DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, TargetCursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight + round(SpritesData[sprArrow].Height / cScaleFactor) - TargetCursorPoint.Y, (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height);
     end;
 
+if uDrawing.isDrawingModeActive() then
+   DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, CursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight + round(SpritesData[sprArrow].Height / cScaleFactor) - CursorPoint.Y, (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height);
+
 // debug stuff
 if cViewLimitsDebug then
     begin
@@ -2010,9 +2014,9 @@
     exit
 end;
 
-if isCursorVisible then
+if isCursorVisible or uDrawing.isDrawingModeActive() then
     begin
-    if (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then
+    if isCursorVisible and (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then
         begin
         SendIPCXY('P', CursorPoint.X - WorldDx, cScreenHeight - CursorPoint.Y - WorldDy);
         PrevSentPointTime:= GameTicks
@@ -2024,7 +2028,8 @@
 
 // this generates the border around the screen that moves the camera when cursor is near it
 if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or
-   (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then
+   (not CurrentTeam^.ExtDriven and isCursorVisible) or
+   ((FollowGear <> nil) and autoCameraOn) or uDrawing.isDrawingModeActive() then
     begin
     if CursorPoint.X < - trunc(cScreenWidth / cScaleFactor) + EdgesDist then
         begin