mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Fix gaia becoming defeated due to yet another missing IsInWorld check.
The check should have been in there for mods (garrisonable CCs) since
the first version, but it was needed the hard way by units becoming
targets in 76d648349d.
This was SVN commit r21782.
This commit is contained in:
parent
ec8d95abe1
commit
fa01a67d42
1 changed files with 7 additions and 3 deletions
|
|
@ -509,11 +509,17 @@ Trigger.prototype.JebelBarkal_SpawnAttackerGroups = function()
|
|||
if (!this.jebelBarkal_attackerGroupSpawnPoints)
|
||||
return;
|
||||
|
||||
this.JebelBarkal_StartAttackTimer(jebelBarkal_attackInterval());
|
||||
|
||||
this.debugLog("Attacker wave (at most " + (jebelBarkal_maxPopulation - this.jebelBarkal_attackerUnits.length) + " attackers)");
|
||||
let time = TriggerHelper.GetMinutes();
|
||||
|
||||
let activePlayers = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager).GetActivePlayers();
|
||||
let playerEntities = activePlayers.map(playerID => TriggerHelper.GetEntitiesByPlayer(playerID));
|
||||
let playerEntities = activePlayers.map(playerID =>
|
||||
TriggerHelper.GetEntitiesByPlayer(playerID).filter(TriggerHelper.IsInWorld));
|
||||
|
||||
let patrolPoints = this.GetTriggerPoints(jebelBarkal_attackerGroup_triggerPointPatrol);
|
||||
|
||||
let groupSizeFactor = jebelBarkal_attackerGroup_sizeFactor(
|
||||
activePlayers.length,
|
||||
this.numInitialSpawnPoints,
|
||||
|
|
@ -582,8 +588,6 @@ Trigger.prototype.JebelBarkal_SpawnAttackerGroups = function()
|
|||
"message": markForTranslation("Napata is attacking!"),
|
||||
"translateMessage": true
|
||||
});
|
||||
|
||||
this.JebelBarkal_StartAttackTimer(jebelBarkal_attackInterval());
|
||||
};
|
||||
|
||||
Trigger.prototype.JebelBarkal_StartAttackTimer = function(delay)
|
||||
|
|
|
|||
Loading…
Reference in a new issue