summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actorspritemanager.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index 03418a857..52d807f64 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -308,9 +308,22 @@ Being *ActorSpriteManager::findBeingByPixel(int x, int y,
if (!*it)
continue;
- if ((*it)->getType() == ActorSprite::FLOOR_ITEM
- || (*it)->getType() == ActorSprite::PORTAL)
+ if ((*it)->getType() == ActorSprite::PORTAL)
+ continue;
+
+ if ((*it)->getType() == ActorSprite::FLOOR_ITEM)
{
+ if (!noBeing)
+ {
+ FloorItem *floor = static_cast<FloorItem*>(*it);
+ if (!noBeing && (floor->getPixelX() - 32 <= x) &&
+ (floor->getPixelX() + 32 > x) &&
+ (floor->getPixelY() - 64 <= y) &&
+ (floor->getPixelY() + 16 > y))
+ {
+ noBeing = true;
+ }
+ }
continue;
}