mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
petra: fix buildLimit when it is 0, reported by fatherbushido
This was SVN commit r18185.
This commit is contained in:
parent
f4e69b7c07
commit
7ddfc89c18
1 changed files with 1 additions and 1 deletions
|
|
@ -1805,7 +1805,7 @@ m.HQ.prototype.canBuild = function(gameState, structure)
|
|||
// build limits
|
||||
var limits = gameState.getEntityLimits();
|
||||
var category = template.buildCategory();
|
||||
if (category && limits[category] && gameState.getEntityCounts()[category] >= limits[category])
|
||||
if (category && limits[category] !== undefined && gameState.getEntityCounts()[category] >= limits[category])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue