++Performance;
This commit is contained in:
@@ -304,9 +304,9 @@ void World::RenderWorld(int& rendercount, Player& player, Transformation& world,
|
||||
void World::UpdateWorld(Player& player, BlockInfo* blockinfo[BTYPE_LAST]) {
|
||||
int cx = player.GetPosition().x;
|
||||
int cy = player.GetPosition().z;
|
||||
static int frameGenerate = 0;
|
||||
static int frameUpdate = 0;
|
||||
static int frameDelete = 0;
|
||||
static int frameGenerate = 1;
|
||||
static int frameUpdate = 2;
|
||||
static int frameDelete = 3;
|
||||
int side = 0;
|
||||
int threads = 0;
|
||||
std::future<Chunk*> genThList[THREADS_GENERATE_CHUNKS];
|
||||
@@ -316,7 +316,7 @@ void World::UpdateWorld(Player& player, BlockInfo* blockinfo[BTYPE_LAST]) {
|
||||
if (frameGenerate > 0) --frameGenerate;
|
||||
if (frameUpdate > 0) --frameUpdate;
|
||||
if (frameDelete > 0) --frameDelete;
|
||||
|
||||
|
||||
if (!frameGenerate)
|
||||
while (side * CHUNK_SIZE_X <= VIEW_DISTANCE * 2 + CHUNK_SIZE_X) {
|
||||
int tx = -side, ty = -side;
|
||||
|
Reference in New Issue
Block a user