From 4d571e0f774ed44090d8ed40a3c115bf4e9f6102 Mon Sep 17 00:00:00 2001 From: qndel Date: Tue, 16 Aug 2022 17:18:22 +0200 Subject: [PATCH] fix cursor item being overwritten --- Source/cursor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 6bf47fe9d..c6404b6a3 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -186,6 +186,12 @@ void NewCursor(const Item &item) void NewCursor(int cursId) { + if (pcurs >= CURSOR_FIRSTITEM && cursId > CURSOR_HAND && cursId < CURSOR_HOURGLASS) { + if (!TryDropItem()) { + return; + } + } + if (cursId < CURSOR_HOURGLASS && MyPlayer != nullptr) { MyPlayer->HoldItem.clear(); }