1
0
forked from 0ad/0ad

Fixes bug in last change to input.js. Use target HP to determine attack possibility. Thus gaia buildings and animals are attackable, but not trees/mines/etc.

This was SVN commit r8798.
This commit is contained in:
historic_bruno 2010-12-05 22:00:07 +00:00
parent f2e1443631
commit 637b471769

View File

@ -181,7 +181,7 @@ function getActionInfo(action, target)
return {"possible": true};
break;
case "attack":
if (entState.attack && (enemyOwned || (gaiaOwned && !targetState.resourceSupply)))
if (entState.attack && targetState.hitpoints && (enemyOwned || gaiaOwned))
return {"possible": true};
}
}