mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Fix to unitAI by FalseVision + fix a mistake of my own
This was SVN commit r15363.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user