1
0
forked from 0ad/0ad

fix guard command broken in recent commits

This was SVN commit r15452.
This commit is contained in:
mimo 2014-06-26 21:15:16 +00:00
parent 58932825a6
commit b1307c83be

View File

@ -398,7 +398,7 @@ var unitActions =
},
"preSelectedActionCheck" : function(target)
{
if (preSelectedAction != ACTION_GARRISON)
if (preSelectedAction != ACTION_GUARD)
return false;
if (getActionInfo("guard", target).possible)
return {"type": "guard", "cursor": "action-guard", "target": target};
@ -421,7 +421,7 @@ var unitActions =
Engine.GuiInterfaceCall("PlaySound", { "name": "order_guard", "entity": selection[0] });
return true;
},
"hotkeyActionCheck": function(target)
"hotkeyActionCheck": function(target, selection)
{
if (Engine.HotkeyIsPressed("session.guard") && getActionInfo("remove-guard", target).possible)
{