mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Stack reversing logic now matches H3
This commit is contained in:
@@ -151,12 +151,12 @@ std::vector<BattleHex> BattleHex::allNeighbouringTiles() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
signed char BattleHex::mutualPosition(BattleHex hex1, BattleHex hex2)
|
||||
BattleHex::EDir BattleHex::mutualPosition(BattleHex hex1, BattleHex hex2)
|
||||
{
|
||||
for(EDir dir = EDir(0); dir <= EDir(5); dir = EDir(dir+1))
|
||||
if(hex2 == hex1.cloneInDirection(dir,false))
|
||||
return dir;
|
||||
return INVALID;
|
||||
return NONE;
|
||||
}
|
||||
|
||||
char BattleHex::getDistance(BattleHex hex1, BattleHex hex2)
|
||||
|
||||
Reference in New Issue
Block a user