Fix to unitAI by FalseVision + fix a mistake of my own

This was SVN commit r15363.
This commit is contained in:
sanderd17
2014-06-15 12:43:52 +00:00
parent 89f33e7579
commit 9a743d65fe
2 changed files with 5 additions and 6 deletions
@@ -188,6 +188,10 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, playerState, items, c
// Determine how many buttons there should be
if (g_SelectionPanels[guiName].maxNumberOfItems)
numberOfItems = Math.min(g_SelectionPanels[guiName].maxNumberOfItems, numberOfItems);
if (g_SelectionPanels[guiName].rowLength)
var rowLength = g_SelectionPanels[guiName].rowLength;
else
var rowLength = 8;
// TODO get this out of here
// Common code for garrison and 'unload all' button counts.
@@ -210,11 +214,6 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, playerState, items, c
panel.size = size;
}
if (g_SelectionPanels[guiName].rowLength)
var rowLength = g_SelectionPanels[guiName].rowLength;
else
var rowLength = 8;
// Make buttons
for (var i = 0; i < numberOfItems; i++)
{
@@ -3561,7 +3561,7 @@ UnitAI.prototype.PushOrderFront = function(type, data)
else if (this.order && this.IsPacking())
{
var packingOrder = this.orderQueue.shift();
this.orderQueue.unshift = (packingOrder, order);
this.orderQueue.unshift(packingOrder, order);
}
else
{