diepcustom icon indicating copy to clipboard operation
diepcustom copied to clipboard

Auto Turrets with a GuardObject Do Not Gain Score from Destroying Objects (e.g. Auto 3, Auto 5)

Open Hanxven opened this issue 2 years ago • 1 comments

A possible workaround is to modify the onKill method of class AutoTurrent in AutoTurrent.ts:

public onKill(killedEntity: LivingEntity) {
    if (!(this.owner instanceof LivingEntity) && !(this.owner instanceof GuardObject)) return;
    this.owner.onKill(killedEntity); // GuardObjet.onKill -> TankBody.onKill -> add score
}

The reason for this change is that the GuardObject, serving as the rotation base, is not a LivingEntity.

Hanxven avatar Nov 16 '23 05:11 Hanxven

Nice catch, feel free to make a PR :)

Nul-led avatar Nov 16 '23 15:11 Nul-led