Sanitize ProductionQueue and fix bugs in TechTreeCache.

Gives perf win on every tick, and fixes bugs where you lose prereqs when buildings are low power.
This commit is contained in:
Paul Chote
2010-09-17 22:21:49 +12:00
committed by Chris Forbes
parent 692ef539f9
commit 22861fca5a
6 changed files with 152 additions and 106 deletions

View File

@@ -46,8 +46,6 @@ namespace OpenRA
{
World = world;
Shroud = new ShroudRenderer(this, world.Map);
PlayerActor = world.CreateActor("Player", new TypeDictionary{ new OwnerInit( this ) });
Index = index;
Palette = "player"+index;
@@ -63,15 +61,14 @@ namespace OpenRA
PlayerRef = pr;
RegisterPlayerColor(world, Palette);
RegisterPlayerColor(world, Palette);
PlayerActor = world.CreateActor("Player", new TypeDictionary{ new OwnerInit( this ) });
}
public Player( World world, Session.Client client, PlayerReference pr, int index )
{
World = world;
Shroud = new ShroudRenderer(this, world.Map);
PlayerActor = world.CreateActor("Player", new TypeDictionary{ new OwnerInit( this ) });
Index = index;
Palette = "player"+index;
@@ -86,7 +83,8 @@ namespace OpenRA
ClientIndex = client.Index;
PlayerRef = pr;
RegisterPlayerColor(world, Palette);
RegisterPlayerColor(world, Palette);
PlayerActor = world.CreateActor("Player", new TypeDictionary{ new OwnerInit( this ) });
}
public void RegisterPlayerColor(World world, string palette)