1
0
forked from mirrors/0ad

Further fixes for Generalized Attack D2092/16b452cf91

Iterating over attack effects incorrectly returned instead of continuing
when the target did not have a receiver.
Polar Sea triggers used Attack instead of Attacking.

Reported By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2235
This was SVN commit r22814.
This commit is contained in:
wraitii
2019-09-01 07:28:50 +00:00
parent dd86d599f5
commit 2c229a986d
2 changed files with 2 additions and 2 deletions
@@ -51,7 +51,7 @@ Trigger.prototype.SpawnWolvesAndAttack = function()
continue;
// The returned entities are sorted by RangeManager already
let targets = Attack.EntitiesNearPoint(attackerPos, 200, players).filter(ent => {
let targets = Attacking.EntitiesNearPoint(attackerPos, 200, players).filter(ent => {
let cmpIdentity = Engine.QueryInterface(ent, IID_Identity);
return cmpIdentity && MatchesClassList(cmpIdentity.GetClassesList(), targetClasses);
});
@@ -239,7 +239,7 @@ Attacking.prototype.HandleAttackEffects = function(attackType, attackData, targe
let receiver = g_EffectReceiver[effectType];
let cmpReceiver = Engine.QueryInterface(target, global[receiver.IID]);
if (!cmpReceiver)
return;
continue;
Object.assign(targetState, cmpReceiver[receiver.method](attackData[effectType], attacker, attackerOwner, bonusMultiplier));
}