remove most of the crap from queries

This commit is contained in:
Chris Forbes
2011-03-17 21:48:50 +13:00
parent eba7641125
commit 149324ea92
21 changed files with 113 additions and 129 deletions

View File

@@ -164,10 +164,10 @@ namespace OpenRA.Mods.RA.Widgets
int updateTicks = 0;
public override void Tick()
{
var hasRadarNew = world.Queries.OwnedBy[world.LocalPlayer]
.WithTrait<ProvidesRadar>()
.Any(a => a.Trait.IsActive);
{
var hasRadarNew = world.Queries
.WithTrait<ProvidesRadar>()
.Any(a => a.Actor.Owner == world.LocalPlayer && a.Trait.IsActive);
if (hasRadarNew != hasRadar)
radarAnimating = true;