summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-08-27 21:47:55 +0000
committerFedja Beader <fedja@protonmail.ch>2024-08-27 21:47:55 +0000
commitb2f7e73bc1b7abff4b5aee4f0f569a4a723dc6e9 (patch)
tree43b2d8a68eb8e00590dff79f3c661ca1bc15b59d /src
parent47bc81a7787222666776ef2dfd9ab61010a70c6c (diff)
downloadplus-b2f7e73bc1b7abff4b5aee4f0f569a4a723dc6e9.tar.gz
plus-b2f7e73bc1b7abff4b5aee4f0f569a4a723dc6e9.tar.bz2
plus-b2f7e73bc1b7abff4b5aee4f0f569a4a723dc6e9.tar.xz
plus-b2f7e73bc1b7abff4b5aee4f0f569a4a723dc6e9.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp27
1 files 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: