Ticket #4015: change4015.2.patch

File change4015.2.patch, 2.2 KB (added by Ágoston Sipos, 7 years ago)
  • binaries/data/mods/public/gui/credits/texts/programming.json

     
    141141            {"nick": "njm"},
    142142            {"nick": "NoMonkey", "name": "John Mena"},
    143143            {"nick": "notpete", "name": "Rich Cross"},
     144            {"nick": "odoaker", "name": "Agoston Sipos"}
    144145            {"nick": "Offensive ePeen", "name": "Jared Ryan Bills"},
    145146            {"nick": "Ols", "name": "Oliver Whiteman"},
    146147            {"nick": "olsner", "name": "Simon Brenner"},
  • binaries/data/mods/public/simulation/components/UnitAI.js

     
    38353835    // Special cases of orders that shouldn't be replaced:
    38363836    // 1. Cheering - we're invulnerable, add order after we finish
    38373837    // 2. Packing/unpacking - we're immobile, add order after we finish (unless it's cancel)
     3838    // 2./1. If order is a move (or out of range attack), we cancel packing immediately and then add the moving order
    38383839    // TODO: maybe a better way of doing this would be to use priority levels
    38393840    if (this.order && this.order.type == "Cheering")
    38403841    {
     
    38443845    }
    38453846    else if (this.IsPacking() && type != "CancelPack" && type != "CancelUnpack")
    38463847    {
    3847         var order = { "type": type, "data": data };
    3848         var packingOrder = this.orderQueue.shift();
    3849         this.orderQueue = [packingOrder, order];
     3848        if(this.ShouldUnpack(type, data))
     3849        {
     3850            this.orderQueue = [];
     3851            this.PushOrder("CancelPack", { "force": true });
     3852        }
     3853        else
     3854        {
     3855            this.orderQueue = [];
     3856            this.PushOrder("CancelUnpack", { "force": true });
     3857        }
     3858        this.PushOrder(type, data);
    38503859    }
    38513860    else
    38523861    {
     
    59605969    return (cmpPack && cmpPack.IsPacking());
    59615970};
    59625971
     5972UnitAI.prototype.ShouldUnpack = function(type, data)
     5973{
     5974    return type == "Attack" && this.CheckTargetAttackRange(data.target, this.GetBestAttackAgainst(data.target, false));
     5975};
     5976
    59635977//// Formation specific functions ////
    59645978
    59655979UnitAI.prototype.IsAttackingAsFormation = function()