mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
fix automatic towers when out of ammo
This commit is contained in:
@ -6117,7 +6117,9 @@ void CGameHandler::runBattle()
|
|||||||
|
|
||||||
for(auto & elem : gs->curB->stacks)
|
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;
|
target = elem;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user