Refactor UnitInfluence trait -> world.ActorMap

This commit is contained in:
Paul Chote
2011-05-22 13:06:14 +12:00
parent d6496cb5be
commit d4baf2d757
25 changed files with 49 additions and 73 deletions

View File

@@ -121,11 +121,10 @@ namespace OpenRA.Mods.RA
static bool CanUseExit(Actor self, ActorInfo producee, ExitInfo s)
{
var uim = self.World.WorldActor.Trait<UnitInfluence>();
var mobileInfo = producee.Traits.GetOrDefault<MobileInfo>();
return mobileInfo == null ||
mobileInfo.CanEnterCell(self.World, uim, self.Location + s.ExitCell, self, true);
mobileInfo.CanEnterCell(self.World, self.Location + s.ExitCell, self, true);
}
}
}