mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
All multi-hex attacks and shots should now be fully functional.
This commit is contained in:
@ -785,15 +785,15 @@ std::set<CStack*> BattleInfo::getAttackedCreatures(const CStack* attacker, THex
|
||||
std::vector<THex> hexes;
|
||||
if (attacker->attackerOwned)
|
||||
{
|
||||
THex::checkAndPush(hex - ( (hex/WN)%2 ? WN+1 : WN ), hexes);
|
||||
THex::checkAndPush(hex - ( (hex/WN)%2 ? WN+1 : WN ), hexes); //upper
|
||||
THex::checkAndPush(hex + 1, hexes);
|
||||
THex::checkAndPush(hex + ( (hex/WN)%2 ? WN : WN+1 ), hexes);
|
||||
THex::checkAndPush(hex + ( (hex/WN)%2 ? WN : WN+1 ), hexes); //lower
|
||||
}
|
||||
else
|
||||
{
|
||||
THex::checkAndPush(hex - ( (hex/WN)%2 ? WN : WN-1 ), hexes);
|
||||
THex::checkAndPush(hex - ( (hex/WN)%2 ? WN+1 : WN ), hexes);
|
||||
THex::checkAndPush(hex - 1, hexes);
|
||||
THex::checkAndPush(hex - ( (hex/WN)%2 ? WN-1 : WN ), hexes);
|
||||
THex::checkAndPush(hex + ( (hex/WN)%2 ? WN-1 : WN ), hexes);
|
||||
}
|
||||
BOOST_FOREACH (THex tile, hexes)
|
||||
{
|
||||
|
Reference in New Issue
Block a user