Shift movement cost/speed into IMove; regressions in a few areas

This commit is contained in:
Paul Chote
2010-06-25 17:05:56 +12:00
parent 6a5869f2c6
commit 29fa9e3aeb
20 changed files with 178 additions and 132 deletions

View File

@@ -98,8 +98,10 @@ namespace OpenRA.Traits
if (content[p.X,p.Y].type == null)
return 1.0f;
var umt = forActor.traits.Get<Mobile>().GetMovementType();
return content[p.X,p.Y].type.GetSpeedModifier(umt);
// Todo: Reenable based off something that isn't umt
return 1f;
//var umt = forActor.traits.Get<Mobile>().GetMovementType();
//return content[p.X,p.Y].type.GetSpeedModifier(umt);
}
public float GetCost(int2 p, Actor forActor)
@@ -107,8 +109,10 @@ namespace OpenRA.Traits
if (content[p.X,p.Y].type == null)
return 1.0f;
var umt = forActor.traits.Get<Mobile>().GetMovementType();
return content[p.X,p.Y].type.GetCost(umt);
// Todo: Reenable based off something that isn't umt
return 1f;
//var umt = forActor.traits.Get<Mobile>().GetMovementType();
//return content[p.X,p.Y].type.GetCost(umt);
}
Sprite[] ChooseContent(ResourceType t)