From c59950edc620afd5ac0247fc255f1cee06f95859 Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 25 Aug 2021 20:42:06 +0200 Subject: [PATCH] fix coords jumping when in inventory --- Source/cursor.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Source/cursor.cpp b/Source/cursor.cpp index bc50d3f35..824f37355 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -276,17 +276,9 @@ void CheckCursMove() if (CanPanelsCoverView()) { if (chrflag || QuestLogIsOpen) { - if (sx >= gnScreenWidth / 2) { /// BUGFIX: (sx >= gnScreenWidth / 2) (fixed) - sx -= gnScreenWidth / 4; - } else { - sx = 0; - } + sx -= gnScreenWidth / 4; } else if (invflag || sbookflag) { - if (sx <= gnScreenWidth / 2) { - sx += gnScreenWidth / 4; - } else { - sx = 0; - } + sx += gnScreenWidth / 4; } } if (sy > PANEL_TOP - 1 && MousePosition.x >= PANEL_LEFT && MousePosition.x < PANEL_LEFT + PANEL_WIDTH && track_isscrolling()) {