This commit is contained in:
Chris Forbes
2009-11-16 21:29:48 +13:00
parent 99275fac36
commit 2a5ef4e830
4 changed files with 43 additions and 31 deletions

View File

@@ -16,8 +16,13 @@ namespace OpenRA.Server
var right = new TcpListener(1235);
right.Start();
var l = left.AcceptTcpClient().GetStream();
var r = right.AcceptTcpClient().GetStream();
var lc = left.AcceptTcpClient();
lc.NoDelay = true;
var l = lc.GetStream();
var rc = right.AcceptTcpClient();
rc.NoDelay = true;
var r = rc.GetStream();
var ll = new Thread(RW(l, r));
var rr = new Thread(RW(r, l));

View File

@@ -65,7 +65,7 @@ namespace OpenRa.Game
DrawBuildPalette("Building");
}
static string[] groups = new string[] { "Building", "Vehicle", "Ship", "Infantry", "Plane" };
static string[] groups = new string[] { "Building", "Defense", "Vehicle", "Ship", "Infantry", "Plane" };
Dictionary<string, Sprite> sprites;
void DrawBuildPalette(string queueName)
@@ -75,7 +75,9 @@ namespace OpenRa.Game
var y = 0;
var buildableItems = Rules.TechTree.BuildableItems(Game.LocalPlayer, queueName).ToArray();
foreach (var item in Rules.TechTree.AllItems(Game.LocalPlayer, queueName))
var allItems = Rules.TechTree.AllItems(Game.LocalPlayer, queueName)
.OrderBy( a => Rules.UnitInfo[a].TechLevel );
foreach (var item in allItems)
{
if (Rules.UnitInfo[item].TechLevel == -1) continue;
var rect = new Rectangle(Game.viewport.Width - (3 - x) * 64 - 20, 32 + 48 * y, 64, 48);

View File

@@ -32,6 +32,7 @@ namespace OpenRa.Game
LoadCategories(
"Building",
"Defense",
"Infantry",
"Vehicle",
"Ship",
@@ -40,6 +41,7 @@ namespace OpenRa.Game
UnitInfo = new InfoLoader<UnitInfo>(
Pair.New<string, Func<string, UnitInfo>>("Building", s => new UnitInfo.BuildingInfo(s)),
Pair.New<string, Func<string, UnitInfo>>("Defense", s => new UnitInfo.BuildingInfo(s)),
Pair.New<string, Func<string, UnitInfo>>("Infantry", s => new UnitInfo.InfantryInfo(s)),
Pair.New<string, Func<string, UnitInfo>>("Vehicle", s => new UnitInfo.VehicleInfo(s)),
Pair.New<string, Func<string, UnitInfo>>("Ship", s => new UnitInfo.VehicleInfo(s)),

View File

@@ -143,27 +143,30 @@ Traits=Mobile, RenderUnitRotor
[BuildingTypes]
[DefenseTypes]
IRON
ATEK
PDOX
WEAP
SYRD
SPEN
PBOX
HBOX
TSLA
GUN
AGUN
FTUR
GAP
SAM
MSLO
[BuildingTypes]
ATEK
WEAP
SYRD
SPEN
FACT
PROC
SILO
HPAD
DOME
GAP
SAM
MSLO
AFLD
POWR
APWR