forked from 0ad/0ad
Fix a bug in TestAllMemberFunction and initialize a variable in cmpBattleDetection. Refs #2372.
This was SVN commit r14579.
This commit is contained in:
parent
a26ab7b1e7
commit
2ca0a20f81
@ -36,6 +36,7 @@ BattleDetection.prototype.Init = function()
|
||||
this.damage = 0; // Damage counter. Accumulative damage done over the current timer period.
|
||||
this.damageRecord = []; // Damage record. Array of elements representing total damage done in a given timer cycle.
|
||||
this.alertness = 0; // Alertness level. Incremented if damage rate exceeds 'damageRateThreshold' over a given timer period and decremented if it does not.
|
||||
this.state = "PEACE";
|
||||
};
|
||||
|
||||
BattleDetection.prototype.setState = function(state)
|
||||
|
@ -5600,7 +5600,7 @@ UnitAI.prototype.TestAllMemberFunction = function(funcname, args)
|
||||
for each (var ent in members)
|
||||
{
|
||||
var cmpUnitAI = Engine.QueryInterface(ent, IID_UnitAI);
|
||||
if (!cmpUnitAI[funcname].apply(cmpUnitAI, args));
|
||||
if (!cmpUnitAI[funcname].apply(cmpUnitAI, args))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user