mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
First part of object instance API cleanup
- removed passability() method in favour of passableFor(PlayerColor) - moved operator < code to map handler - updated class documentation
This commit is contained in:
@@ -853,10 +853,7 @@ void CGBorderGate::onHeroVisit( const CGHeroInstance * h ) const //TODO: passabi
|
||||
}
|
||||
}
|
||||
|
||||
ui8 CGBorderGate::getPassableness() const
|
||||
bool CGBorderGate::passableFor(PlayerColor color) const
|
||||
{
|
||||
ui8 ret = 0;
|
||||
for (int i = 0; i < PlayerColor::PLAYER_LIMIT_I; i++)
|
||||
ret |= wasMyColorVisited(PlayerColor(i))<<i;
|
||||
return ret;
|
||||
return wasMyColorVisited(color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user