fix warnings; fix small bug in Bullet; fix impossible prereqs

This commit is contained in:
Chris Forbes
2010-01-08 12:18:31 +13:00
parent 69da6fdd2d
commit 49774e022d
8 changed files with 123 additions and 117 deletions

View File

@@ -35,8 +35,9 @@ namespace OpenRa.Game.GameRules
return false;
foreach( var p in unit.Prerequisite )
if( playerBuildings[ p ].Count == 0 )
return false;
if (Rules.UnitInfo[p.ToLowerInvariant()].Owner.Any(x => x == player.Race))
if( playerBuildings[ p ].Count == 0 )
return false;
if( producesIndex[ Rules.UnitCategory[ unit.Name ] ].All( x => playerBuildings[ x.Name ].Count == 0 ) )
return false;