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

@@ -83,9 +83,8 @@ namespace OpenRA.Orders
public override void Tick(World world)
{
var hasStructure = world.Queries.OwnedBy[world.LocalPlayer]
.WithTrait<T>()
.Any();
var hasStructure = world.Queries.WithTrait<T>()
.Any( a => a.Actor.Owner == world.LocalPlayer );
if (!hasStructure)
world.CancelInputMode();