This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 9601 for ps


Ignore:
Timestamp:
06/09/11 18:41:55 (14 years ago)
Author:
philip
Message:

Remove redundant code for animal fleeing, and don't omit expected arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js

    r9595 r9601  
    10891089                this.template.NaturalBehaviour == "passive")
    10901090            {
    1091                 this.MoveToTargetRangeExplicit(msg.data.attacker, +this.template.FleeDistance, +this.template.FleeDistance);
    1092                 this.Flee(msg.data.attacker);
     1091                this.Flee(msg.data.attacker, false);
    10931092            }
    10941093            else if (this.template.NaturalBehaviour == "violent" ||
     
    10971096            {
    10981097                if (this.CanAttack(msg.data.attacker))
    1099                     this.ReplaceOrder("Attack", { "target": msg.data.attacker });
     1098                    this.Attack(msg.data.attacker, false);
    11001099            }
    11011100        },
     
    11591158                    if (msg.data.added.length > 0)
    11601159                    {
    1161                         this.MoveToTargetRangeExplicit(msg.data.added[0], +this.template.FleeDistance, +this.template.FleeDistance);
    1162                         this.Flee(msg.data.added[0]);
     1160                        this.Flee(msg.data.added[0], false);
    11631161                        return;
    11641162                    }
     
    12041202                    if (msg.data.added.length > 0)
    12051203                    {
    1206                         this.MoveToTargetRangeExplicit(msg.data.added[0], +this.template.FleeDistance, +this.template.FleeDistance);
    1207                         this.Flee(msg.data.added[0]);
     1204                        this.Flee(msg.data.added[0], false);
    12081205                        return;
    12091206                    }
Note: See TracChangeset for help on using the changeset viewer.