forked from 0ad/0ad
parent
2d4ec03019
commit
2548187474
@ -229,6 +229,8 @@ EntitySelection.prototype.update = function()
|
||||
{
|
||||
var changed = false;
|
||||
this.checkRenamedEntities();
|
||||
var removeOwnerChanges = !g_DevSettings.controlAll && this.toList().length > 1;
|
||||
var playerID = Engine.GetPlayerID();
|
||||
for each (var ent in this.selected)
|
||||
{
|
||||
var entState = GetEntityState(ent);
|
||||
@ -245,7 +247,9 @@ EntitySelection.prototype.update = function()
|
||||
// Remove non-visible units (e.g. moved back into fog-of-war)
|
||||
// At the next update, mirages will be renamed to the real
|
||||
// entity they replace, so just ignore them now
|
||||
if (entState.visibility == "hidden" && !entState.mirage)
|
||||
// Futhermore, when multiple selection, remove units which have changed ownership
|
||||
if ((entState.visibility == "hidden" && !entState.mirage)
|
||||
|| (removeOwnerChanges && entState.player != playerID))
|
||||
{
|
||||
// Disable any highlighting of the disappeared unit
|
||||
_setHighlight([ent], 0, false);
|
||||
|
@ -374,7 +374,6 @@ function updateSelectionDetails()
|
||||
var detailsPanel = Engine.GetGUIObjectByName("selectionDetails");
|
||||
var commandsPanel = Engine.GetGUIObjectByName("unitCommands");
|
||||
|
||||
g_Selection.update();
|
||||
var selection = g_Selection.toList();
|
||||
|
||||
if (selection.length == 0)
|
||||
|
@ -536,6 +536,8 @@ function onSimulationUpdate()
|
||||
|
||||
handleNotifications();
|
||||
|
||||
g_Selection.update();
|
||||
|
||||
if (g_ShowAllStatusBars)
|
||||
recalculateStatusBarDisplay();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user