Index: binaries/data/mods/public/simulation/components/Attack.js =================================================================== --- binaries/data/mods/public/simulation/components/Attack.js +++ binaries/data/mods/public/simulation/components/Attack.js @@ -487,6 +487,7 @@ this.resyncAnimation = prepare != timings.prepare; this.target = target; this.callerIID = callerIID; + this.lastAttackedType = type; this.timer = cmpTimer.SetInterval(this.entity, IID_Attack, "Attack", prepare, timings.repeat, type); return true; @@ -509,6 +510,7 @@ cmpResistance.RemoveAttacker(this.entity); delete this.target; + delete this.lastAttackedType; let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual); if (cmpVisual) @@ -748,6 +750,9 @@ if (msg.component != "Attack") return; + if (this.target) + this.StartAttacking(this.target, this.lastAttackedType, this.callerIID); + let cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI); if (!cmpUnitAI) return;