New crush code, now with less bs

This commit is contained in:
Paul Chote
2010-06-25 20:57:06 +12:00
parent 00b91bd7ad
commit 7c3a10396c
16 changed files with 70 additions and 94 deletions

View File

@@ -49,29 +49,6 @@ namespace OpenRA
.Buildable;
}
public static bool IsActorCrushableByActor(this World world, Actor a, Actor b)
{
return false;
//var movement = b.traits.GetOrDefault<IMove>();
//return movement != null && world.IsActorCrushableByMovementType(a, movement.GetMovementType());
}
// Todo: Reenable crushing based on actor, not umt
/*
public static bool IsActorPathableToCrush(this World world, Actor a, UnitMovementType umt)
{
return a != null &&
a.traits.WithInterface<ICrushable>()
.Any(c => c.IsPathableCrush(umt, a.Owner));
}
public static bool IsActorCrushableByMovementType(this World world, Actor a, UnitMovementType umt)
{
return a != null &&
a.traits.WithInterface<ICrushable>()
.Any(c => c.IsCrushableBy(umt, a.Owner));
}
*/
public static IEnumerable<Actor> FindUnitsAtMouse(this World world, int2 mouseLocation)
{
var loc = mouseLocation + Game.viewport.Location;