From 82a5989f5cfa77cbae890c13697becdc0338c967 Mon Sep 17 00:00:00 2001 From: LordHepipud Date: Mon, 17 Feb 2014 22:51:59 +0100 Subject: [PATCH] Fix Tile::getTopLookThing() Fixing an issue which returned splash items instead of real usable items. In case a blood splash is inside an open door, you are unable to close it. This patch will ignore splash items and return the real usable item correctly. ~~~~Lord Hepipud~~~~ --- src/client/tile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 3a93395e..a9d702c4 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -399,13 +399,13 @@ ThingPtr Tile::getTopUseThing() for(uint i = 0; i < m_things.size(); ++i) { ThingPtr thing = m_things[i]; - if(thing->isForceUse() || (!thing->isGround() && !thing->isGroundBorder() && !thing->isOnBottom() && !thing->isOnTop() && !thing->isCreature())) + if (thing->isForceUse() || (!thing->isGround() && !thing->isGroundBorder() && !thing->isOnBottom() && !thing->isOnTop() && !thing->isCreature() && !thing->isSplash())) return thing; } for(uint i = 0; i < m_things.size(); ++i) { ThingPtr thing = m_things[i]; - if(!thing->isGround() && !thing->isGroundBorder() && !thing->isCreature()) + if (!thing->isGround() && !thing->isGroundBorder() && !thing->isCreature() && !thing->isSplash()) return thing; }