queries dies

This commit is contained in:
Chris Forbes
2011-03-17 22:05:53 +13:00
parent caa52b2780
commit a3994df925
34 changed files with 52 additions and 66 deletions

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
// Trigger screen desaturate effect
foreach (var a in self.World.Queries.WithTrait<ChronoshiftPaletteEffect>())
foreach (var a in self.World.ActorsWithTrait<ChronoshiftPaletteEffect>())
a.Trait.Enable();
Sound.Play("chrono2.aud", Game.CellSize * order.TargetLocation);

View File

@@ -60,7 +60,7 @@ namespace OpenRA.Mods.RA
void RefreshGps(Actor self)
{
if (self.World.LocalPlayer != null)
self.World.LocalShroud.Disabled = self.World.Queries.WithTrait<GpsPower>()
self.World.LocalShroud.Disabled = self.World.ActorsWithTrait<GpsPower>()
.Any(p => p.Actor.Owner.Stances[self.World.LocalPlayer] == Stance.Ally &&
p.Trait.Granted);
}