mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
* bug #569 fixed
This commit is contained in:
parent
28550c85fd
commit
8a063b88e5
@ -2376,8 +2376,9 @@ const CGHeroInstance * CBattleInterface::getActiveHero()
|
||||
void CBattleInterface::hexLclicked(int whichOne)
|
||||
{
|
||||
const CStack * actSt = activeStack;
|
||||
const CStack* dest = curInt->cb->battleGetStackByPos(whichOne); //creature at destination tile; -1 if there is no one
|
||||
if( ((whichOne%BFIELD_WIDTH)!=0 && (whichOne%BFIELD_WIDTH)!=(BFIELD_WIDTH-1)) //if player is trying to attack enemey unit or move creature stack
|
||||
|| (actSt->hasBonusOfType(Bonus::CATAPULT) && !spellDestSelectMode )
|
||||
|| (actSt->hasBonusOfType(Bonus::CATAPULT) && !spellDestSelectMode || dest ) //enemy's first aid tent can stand there and we want to shoot it
|
||||
)
|
||||
{
|
||||
if(!myTurn)
|
||||
@ -2423,7 +2424,6 @@ void CBattleInterface::hexLclicked(int whichOne)
|
||||
}
|
||||
else //we don't cast any spell
|
||||
{
|
||||
const CStack* dest = curInt->cb->battleGetStackByPos(whichOne); //creature at destination tile; -1 if there is no one
|
||||
if(!dest || !dest->alive()) //no creature at that tile
|
||||
{
|
||||
if(std::find(shadedHexes.begin(),shadedHexes.end(),whichOne)!=shadedHexes.end())// and it's in our range
|
||||
|
Loading…
x
Reference in New Issue
Block a user