Remove Actor.HasTrait<T>()

This commit is contained in:
atlimit8
2015-08-01 23:53:58 -05:00
parent 959914779f
commit 85fab45451
79 changed files with 153 additions and 153 deletions

View File

@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits
public void Tick(World world)
{
if (subjects.All(s => s.IsDead || !s.HasTrait<Guard>()))
if (subjects.All(s => s.IsDead || !s.Info.Traits.Contains<GuardInfo>()))
world.CancelInputMode();
}
@@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Traits
return world.ScreenMap.ActorsAt(mi)
.Where(a => !world.FogObscures(a) && !a.IsDead &&
a.AppearsFriendlyTo(world.LocalPlayer.PlayerActor) &&
a.HasTrait<Guardable>());
a.Info.Traits.Contains<GuardableInfo>());
}
}
}