server stuff

This commit is contained in:
Chris Forbes
2009-11-30 21:18:50 +13:00
parent fa02e9d45c
commit 2913c3310d
7 changed files with 163 additions and 50 deletions

View File

@@ -34,13 +34,18 @@ namespace OpenRa.Game.Traits
{
var mobile = newUnit.traits.GetOrDefault<Mobile>();
if( mobile != null )
newUnit.QueueActivity( new Traits.Activities.Move( rp.rallyPoint, 1 ) );
newUnit.QueueActivity( new Activities.Move( rp.rallyPoint, 1 ) );
var heli = newUnit.traits.GetOrDefault<Helicopter>();
if( heli != null )
if (heli != null)
heli.targetLocation = rp.rallyPoint; // TODO: make Activity.Move work for helis.
}
var bi = self.unitInfo as BuildingInfo;
if (bi != null && bi.SpawnOffset != null)
newUnit.CenterLocation = self.CenterLocation
+ new float2(bi.SpawnOffset[0], bi.SpawnOffset[1]);
Game.world.Add( newUnit );
if( self.traits.Contains<RenderWarFactory>() )