Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/attackPlan.js
Show First 20 Lines • Show All 2,125 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/** | /** | ||||
* The center position of this attack may be in an inaccessible area. So we use the access | * The center position of this attack may be in an inaccessible area. So we use the access | ||||
* of the unit nearest to this center position. | * of the unit nearest to this center position. | ||||
*/ | */ | ||||
PETRA.AttackPlan.prototype.getAttackAccess = function(gameState) | PETRA.AttackPlan.prototype.getAttackAccess = function(gameState) | ||||
{ | { | ||||
// JCWASMX86_TODO: Not sure why it is needed, but otherwise | |||||
// it would throw errors. | |||||
if (this.position == undefined) | |||||
Stan: Might want to print the stack e.g
```lang=js
warn(new Error().stack);
```
To see what's calling… | |||||
return 0; | |||||
for (let ent of this.unitCollection.filterNearest(this.position, 1).values()) | for (let ent of this.unitCollection.filterNearest(this.position, 1).values()) | ||||
return PETRA.getLandAccess(gameState, ent); | return PETRA.getLandAccess(gameState, ent); | ||||
return 0; | return 0; | ||||
}; | }; | ||||
PETRA.AttackPlan.prototype.debugAttack = function() | PETRA.AttackPlan.prototype.debugAttack = function() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Might want to print the stack e.g
To see what's calling it.