Capture attack doesn't work for unit with a buildingAI
Since r16907 (see #3356), Siege Tower has a capture attack (wich makes sense). As for other units we can have both a capture attack and another attack, here we have a problem.
When targetting a building, we show the capture attack pointer, then the siege tower stay idle near the building.
So the capture attack doesn't work for a unit with a BuildingAI
.
Indeed, it's implemented like that in L1897-L1903 of UnitAI.js
// BuildingAI has it's own attack-routine
if (!cmpBuildingAI)
{
let cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
cmpAttack.PerformAttack(this.order.data.attackType, target);
}
replacing
if (!cmpBuildingAI)
by
if (!cmpBuildingAI) || this.order.data.attackType != "ranged"
fixes that but would hide the need to split the multiple arrow attack logic for structures and units.
See also #252 and #4000 for related (in a way or another) tickets.
Change History
(9)
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Component: |
UI & Simulation → Simulation
|
Milestone: |
Backlog → Work In Progress
|
Patch: |
→ Phab:D1819
|
In 18766: