Reduce time spent on chunk loading

Not sure why this is so slow. Will find out at some point.
This commit is contained in:
Drew DeVault 2015-07-07 00:32:10 -06:00
parent d27882cdec
commit a476e04e32

View File

@ -378,16 +378,9 @@ namespace TrueCraft
{
}
}
if (ChunksToSchedule.Count != 0)
{
int attempts = 50;
while (attempts-- > 0)
{
Tuple<IWorld, IChunk> t;
if (ChunksToSchedule.TryTake(out t))
ScheduleUpdatesForChunk(t.Item1, t.Item2);
}
}
Tuple<IWorld, IChunk> t;
if (ChunksToSchedule.TryTake(out t))
ScheduleUpdatesForChunk(t.Item1, t.Item2);
EnvironmentWorker.Change(1000 / 20, 0);
}