mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 07:03:42 +00:00
improve gui performance, refs #2179 comment 21
This was SVN commit r15836.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user