Ticket #3221: fix-t3221.diff

File fix-t3221.diff, 922 bytes (added by mimo, 9 years ago)

from the previous comment, I think this patch would fix it. But I've made only one game (without error!). Should be tested more.

  • binaries/data/mods/public/simulation/components/UnitAI.js

     
    447447                return;
    448448            }
    449449
    450             if (this.order.data.attackType == this.oldAttackType)
    451             {
    452                 if (this.IsAnimal())
    453                     this.SetNextState("ANIMAL.COMBAT.ATTACKING");
    454                 else
    455                     this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
    456             }
     450            if (this.IsAnimal())
     451                this.SetNextStateAlwaysEntering("ANIMAL.COMBAT.ATTACKING");
    457452            else
    458             {
    459                 if (this.IsAnimal())
    460                     this.SetNextStateAlwaysEntering("ANIMAL.COMBAT.ATTACKING");
    461                 else
    462                     this.SetNextStateAlwaysEntering("INDIVIDUAL.COMBAT.ATTACKING");
    463             }
     453                this.SetNextStateAlwaysEntering("INDIVIDUAL.COMBAT.ATTACKING");
    464454            return;
    465455        }
    466456