From b2f7e73bc1b7abff4b5aee4f0f569a4a723dc6e9 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Tue, 27 Aug 2024 21:47:55 +0000 Subject: Redundant. I don't think the time savings due to not calculating distance, if any, are worth it. In fact, this might even save some time. Calculating distance may be faster than iterating through memory twice. **** mana/plus!95 --- src/being/localplayer.cpp | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 8f0f7a4cd..670fb58cd 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -1672,39 +1672,18 @@ bool LocalPlayer::pickUpItems(int pickUpType) break; case 4: - if (!actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1, false)) - { - if (actorManager->pickUpNearest(x, y, 4)) - status = true; - } - else - { + if (actorManager->pickUpNearest(x, y, 4)) status = true; - } break; case 5: - if (!actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1, false)) - { - if (actorManager->pickUpNearest(x, y, 8)) - status = true; - } - else - { + if (actorManager->pickUpNearest(x, y, 8)) status = true; - } break; case 6: - if (!actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1, false)) - { - if (actorManager->pickUpNearest(x, y, 90)) - status = true; - } - else - { + if (actorManager->pickUpNearest(x, y, 90)) status = true; - } break; default: -- cgit v1.2.3-70-g09d2