mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Play sound of entity that is able to perform a command.
In unit_actions.js sounds of the first entity that is able are now played, instead of trying to play a sound of the first entity of the selection, which may or may not be able to perform the command. Differential revision: D3099 Reviewed by: @bb This was SVN commit r24449.
This commit is contained in:
parent
fe1356b80c
commit
47b9d2a02e
1 changed files with 13 additions and 13 deletions
|
|
@ -59,7 +59,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_walk",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -109,7 +109,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_walk",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -151,7 +151,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_attack",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -196,7 +196,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_attack",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -251,7 +251,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_patrol",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
return true;
|
||||
},
|
||||
|
|
@ -298,7 +298,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_heal",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -363,7 +363,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": action.foundation ? "order_build" : "order_repair",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -420,7 +420,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_gather",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -470,7 +470,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_gather",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -579,7 +579,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_trade",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -679,7 +679,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_garrison",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -751,7 +751,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_guard",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
@ -804,7 +804,7 @@ var g_UnitActions =
|
|||
|
||||
Engine.GuiInterfaceCall("PlaySound", {
|
||||
"name": "order_guard",
|
||||
"entity": selection[0]
|
||||
"entity": action.firstAbleEntity
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue