1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

* reading ZCRBANK.TXT config file

* fixed off by one error reported here: http://antypika.aplus.pl/vcmi/forum/viewtopic.php?p=3324&sid=ee179a979bdc27add85c21c72161f539#3324
This commit is contained in:
mateuszb
2009-08-20 10:07:23 +00:00
parent 8458a03e85
commit de886abc0e
4 changed files with 122 additions and 20 deletions

View File

@ -378,7 +378,11 @@ std::vector<int> BattleInfo::getAccessibility(int stackID, bool addOccupiable)
std::vector<int> rem;
for(int b=0; b<BFIELD_SIZE; ++b)
{
if( ac[b] && !(s->attackerOwned ? ac[b-1] : ac[b+1]))
//don't take into account most left and most right columns of hexes
if( b % BFIELD_WIDTH == 0 || b % BFIELD_WIDTH == BFIELD_WIDTH - 1 )
continue;
if( ac[b] && !(s->attackerOwned ? ac[b-1] : ac[b+1]) )
{
rem.push_back(b);
}