server stuff
This commit is contained in:
@@ -103,6 +103,7 @@ namespace OpenRa.Game.GameRules
|
||||
public readonly int Storage = 0;
|
||||
public readonly bool Unsellable = false;
|
||||
public readonly int[] RallyPoint = { 1, 3 };
|
||||
public readonly float[] SpawnOffset = null;
|
||||
|
||||
public BuildingInfo(string name) : base(name) { }
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using IjwFramework.Types;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
@@ -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>() )
|
||||
|
||||
Reference in New Issue
Block a user