mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
Properly Fix #301
This commit is contained in:
@@ -590,15 +590,24 @@ bool Tile::hasCreature()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Tile::limitsFloorsView()
|
||||
bool Tile::limitsFloorsView(bool isFreeView)
|
||||
{
|
||||
// ground and walls limits the view
|
||||
ThingPtr firstThing = getThing(0);
|
||||
if(firstThing && !firstThing->isDontHide() && (firstThing->isGround() || firstThing->isOnBottom()))
|
||||
return true;
|
||||
|
||||
if(isFreeView){
|
||||
if(firstThing && !firstThing->isDontHide() && (firstThing->isGround() || firstThing->isOnBottom()))
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(firstThing && !firstThing->isDontHide() && (firstThing->isGround() || (firstThing->isOnBottom() && firstThing->blockProjectile())))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Tile::canErase()
|
||||
{
|
||||
return m_walkingCreatures.empty() && m_effects.empty() && m_things.empty() && m_flags == 0 && m_minimapColor == 0;
|
||||
|
Reference in New Issue
Block a user