mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
fix automatic towers when out of ammo
This commit is contained in:
parent
61f870af90
commit
4e359cd2a3
@ -6117,7 +6117,9 @@ void CGameHandler::runBattle()
|
||||
|
||||
for(auto & elem : gs->curB->stacks)
|
||||
{
|
||||
if(elem->owner != next->owner && elem->isValidTarget())
|
||||
if(elem->owner != next->owner
|
||||
&& elem->isValidTarget()
|
||||
&& gs->curB->battleCanShoot(next, elem->getPosition()))
|
||||
{
|
||||
target = elem;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user