mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Refactor BattleHex, remake the use of precomputed neighbouring tiles containers.
- Moved short, frequently used functions to the BattleHex header for inlining - Made BattleHex a class with a private hex value - Moved getClosestTile implementation back to BattleHex - Enabled access to static precomputed data in BattleHexArray via BattleHex (note: circular dependency prevented static precomputed containers being directly placed in BattleHex)
This commit is contained in:
@ -195,7 +195,7 @@ const CCreature *BattleSiegeController::getTurretCreature(BattleHex position) co
|
||||
return town->fortificationsLevel().lowerTowerShooter.toCreature();
|
||||
}
|
||||
|
||||
throw std::runtime_error("Unable to select shooter for tower at " + std::to_string(position.hex));
|
||||
throw std::runtime_error("Unable to select shooter for tower at " + std::to_string(position));
|
||||
}
|
||||
|
||||
Point BattleSiegeController::getTurretCreaturePosition( BattleHex position ) const
|
||||
|
Reference in New Issue
Block a user