forked from 0ad/0ad
parent
e1488fee56
commit
47a516df34
@ -1072,6 +1072,9 @@ function handleInputBeforeGui(ev, hoveredObject)
|
||||
|
||||
function handleInputAfterGui(ev)
|
||||
{
|
||||
if (ev.hotkey === undefined)
|
||||
ev.hotkey = null;
|
||||
|
||||
// Handle the time-warp testing features, restricted to single-player
|
||||
if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
|
||||
{
|
||||
|
@ -537,7 +537,7 @@ ProductionQueue.prototype.SpawnUnits = function(templateName, count, metadata)
|
||||
if (cmpRallyPoint)
|
||||
{
|
||||
var data = cmpRallyPoint.GetData()[0];
|
||||
if (data && data.target == this.entity && data.command == "garrison")
|
||||
if (data && data.target && data.target == this.entity && data.command == "garrison")
|
||||
cmpAutoGarrison = Engine.QueryInterface(this.entity, IID_GarrisonHolder);
|
||||
}
|
||||
|
||||
|
@ -3083,6 +3083,8 @@ UnitAI.prototype.Init = function()
|
||||
this.lastFormationTemplate = "";
|
||||
this.finishedOrder = false; // used to find if all formation members finished the order
|
||||
|
||||
this.heldPosition = undefined;
|
||||
|
||||
// Queue of remembered works
|
||||
this.workOrders = [];
|
||||
|
||||
@ -5389,7 +5391,7 @@ UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|
||||
this.SetHeldPosition(pos.x, pos.z);
|
||||
};
|
||||
|
||||
UnitAI.prototype.GetHeldPosition = function(pos)
|
||||
UnitAI.prototype.GetHeldPosition = function()
|
||||
{
|
||||
return this.heldPosition;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user