more refs to Game.world (Orders, etc)

This commit is contained in:
Bob
2010-01-21 13:47:06 +13:00
parent f01990cae1
commit 232ed72bbf
5 changed files with 17 additions and 17 deletions

View File

@@ -54,11 +54,11 @@ namespace OpenRa.Orders
}
}
void ProcessOrders(int frame, bool save)
void ProcessOrders(World world, int frame, bool save)
{
var orders = sources
.SelectMany(s => s.OrdersForFrame(frame))
.SelectMany(x => x.ToOrderList())
.SelectMany(x => x.ToOrderList(world))
.OrderBy(o => o.Player.Index)
.ToList();
@@ -69,24 +69,24 @@ namespace OpenRa.Orders
savingReplay.WriteFrameData(orders, frame);
}
public void TickImmediate()
public void TickImmediate( World world )
{
var localOrders = Game.controller.GetRecentOrders(true);
if (localOrders.Count > 0)
foreach (var p in sources)
p.SendLocalOrders(0, localOrders);
ProcessOrders(0, false);
ProcessOrders(world, 0, false);
}
public void Tick()
public void Tick( World world )
{
var localOrders = Game.controller.GetRecentOrders(false);
foreach( var p in sources )
p.SendLocalOrders( frameNumber + FramesAhead, localOrders );
ProcessOrders(frameNumber, true);
ProcessOrders(world, frameNumber, true);
++frameNumber;