use UIM (was BIM) to determine what cells a building blocks

This commit is contained in:
Bob
2010-11-03 16:42:53 +13:00
committed by Chris Forbes
parent f5b8b18d86
commit c3fc7b98f3
6 changed files with 23 additions and 60 deletions

View File

@@ -98,13 +98,12 @@ namespace OpenRA.Mods.RA
// required for 3-arg CanEnterCell
//var mobile = newUnit.Trait<Mobile>();
var mobileInfo = producee.Traits.Get<MobileInfo>();
var bim = self.World.WorldActor.Trait<BuildingInfluence>();
var uim = self.World.WorldActor.Trait<UnitInfluence>();
// Pick a spawn/exit point pair
// Todo: Reorder in a synced random way
foreach (var s in self.Info.Traits.WithInterface<ExitInfo>())
if( Mobile.CanEnterCell( mobileInfo, self.World, uim, bim, self.Location + s.ExitCell,self,true ) )
if( Mobile.CanEnterCell( mobileInfo, self.World, uim, self.Location + s.ExitCell,self,true ) )
{
DoProduction(self, producee, s);
return true;