mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
During the unit tests I saw that hex can take from occupiedHex() signed
values and then he get stupid value. So changing from ui16 to si16.
This commit is contained in:
@ -1479,7 +1479,7 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
|
|||||||
RETURN_IF_NOT_BATTLE(at);
|
RETURN_IF_NOT_BATTLE(at);
|
||||||
|
|
||||||
const int WN = GameConstants::BFIELD_WIDTH;
|
const int WN = GameConstants::BFIELD_WIDTH;
|
||||||
ui16 hex = (attackerPos != BattleHex::INVALID) ? attackerPos.hex : attacker->position.hex; //real or hypothetical (cursor) position
|
si16 hex = (attackerPos != BattleHex::INVALID) ? attackerPos.hex : attacker->position.hex; //real or hypothetical (cursor) position
|
||||||
|
|
||||||
//FIXME: dragons or cerbers can rotate before attack, making their base hex different (#1124)
|
//FIXME: dragons or cerbers can rotate before attack, making their base hex different (#1124)
|
||||||
bool reverse = isToReverse (hex, destinationTile, isAttacker, attacker->doubleWide(), isAttacker);
|
bool reverse = isToReverse (hex, destinationTile, isAttacker, attacker->doubleWide(), isAttacker);
|
||||||
|
Reference in New Issue
Block a user