merge Game.Init into PreInit; fix exploit involving chrome.CheckDeadTab; fixed cancel behaviour wrt canceling an item not currently in the queue (because of orderlag, etc)

This commit is contained in:
Bob
2010-04-16 14:18:30 +12:00
parent db46502123
commit 55352d7df9
4 changed files with 28 additions and 37 deletions

View File

@@ -136,7 +136,6 @@ namespace OpenRA
foreach (var q in tabImageNames)
if (!Rules.TechTree.BuildableItems(world.LocalPlayer, q.Key).Any())
{
CheckDeadTab(world, q.Key);
if (currentTab == q.Key)
currentTab = null;
}
@@ -544,13 +543,6 @@ namespace OpenRA
paletteAnimating = true;
}
void CheckDeadTab( World world, string groupName )
{
var queue = world.LocalPlayer.PlayerActor.traits.Get<Traits.ProductionQueue>();
foreach( var item in queue.AllItems( groupName ) )
Game.IssueOrder(Order.CancelProduction(world.LocalPlayer, item.Item));
}
float? lastPowerProvidedPos;
float? lastPowerDrainedPos;