From 1b10ceed4ef317ec53a1c0fd82936c8da3c90132 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 17 Nov 2009 20:57:26 +1300 Subject: [PATCH] fixes chrome showing wrong side's units --- OpenRa.Game/GameRules/TechTree.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/GameRules/TechTree.cs b/OpenRa.Game/GameRules/TechTree.cs index 2ed7f9882a..dcdfd3c348 100755 --- a/OpenRa.Game/GameRules/TechTree.cs +++ b/OpenRa.Game/GameRules/TechTree.cs @@ -56,7 +56,8 @@ namespace OpenRa.Game.GameRules public IEnumerable AllItems(Player player, params string[] categories) { - return categories.SelectMany(x => Rules.Categories[x]).Select(x => Rules.UnitInfo[x].Name); + return categories.SelectMany(x => Rules.Categories[x]).Select(x => Rules.UnitInfo[x].Name) + .Where(x => Rules.UnitInfo[x].Owner.Contains(player.Race)); /* todo: fix for dual-race scenarios (captured buildings) */ } public IEnumerable UnitBuiltAt( UnitInfo info )