Shift movement cost/speed into IMove; regressions in a few areas
This commit is contained in:
@@ -92,17 +92,19 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public float GetCost(int2 p, Actor forActor)
|
||||
{
|
||||
var umt = forActor.traits.Get<Mobile>().GetMovementType();
|
||||
if (customTerrain[p.X, p.Y] != null)
|
||||
return customTerrain[p.X,p.Y].GetCost(p,umt);
|
||||
// Todo: Do we even need to reenable this since cost = 100% for everything?
|
||||
//var umt = forActor.traits.Get<Mobile>().GetMovementType();
|
||||
//if (customTerrain[p.X, p.Y] != null)
|
||||
// return customTerrain[p.X,p.Y].GetCost(p,umt);
|
||||
return 1f;
|
||||
}
|
||||
|
||||
public float GetSpeedModifier(int2 p, Actor forActor)
|
||||
{
|
||||
var umt = forActor.traits.Get<Mobile>().GetMovementType();
|
||||
if (customTerrain[p.X, p.Y] != null)
|
||||
return customTerrain[p.X,p.Y].GetSpeedModifier(p,umt);
|
||||
// Todo: Do we even need to reenable this since cost = 100% for everything?
|
||||
//var umt = forActor.traits.Get<Mobile>().GetMovementType();
|
||||
//if (customTerrain[p.X, p.Y] != null)
|
||||
// return customTerrain[p.X,p.Y].GetSpeedModifier(p,umt);
|
||||
return 1f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user