1
0
forked from mirrors/0ad

improve gui performance, refs #2179 comment 21

This was SVN commit r15836.
This commit is contained in:
mimo
2014-10-04 11:40:53 +00:00
parent 8a3435915b
commit e91215d5c9
2 changed files with 8 additions and 3 deletions
@@ -808,7 +808,7 @@ g_SelectionPanels.Selection = {
data.count = ents.length;
for (var i in ents)
{
var state = GetExtendedEntityState(ents[i]);
var state = GetEntityState(ents[i]);
if (state.resourceCarrying && state.resourceCarrying.length !== 0)
{
@@ -198,6 +198,7 @@ GuiInterface.prototype.GetEntityState = function(player, ent)
"position": null,
"production": null,
"rallyPoint": null,
"resourceCarrying": null,
"rotation": null,
"trader": null,
"unitAI": null,
@@ -345,6 +346,12 @@ GuiInterface.prototype.GetEntityState = function(player, ent)
};
}
var cmpResourceGatherer = Engine.QueryInterface(ent, IID_ResourceGatherer);
if (cmpResourceGatherer)
{
ret.resourceCarrying = cmpResourceGatherer.GetCarryingStatus();
}
var cmpGate = Engine.QueryInterface(ent, IID_Gate);
if (cmpGate)
{
@@ -384,7 +391,6 @@ GuiInterface.prototype.GetExtendedEntityState = function(player, ent)
"obstruction": null,
"turretParent":null,
"promotion": null,
"resourceCarrying": null,
"resourceDropsite": null,
"resourceGatherRates": null,
"resourceSupply": null,
@@ -502,7 +508,6 @@ GuiInterface.prototype.GetExtendedEntityState = function(player, ent)
if (cmpResourceGatherer)
{
ret.resourceGatherRates = cmpResourceGatherer.GetGatherRates();
ret.resourceCarrying = cmpResourceGatherer.GetCarryingStatus();
}
var cmpResourceDropsite = Engine.QueryInterface(ent, IID_ResourceDropsite);