@@ -26,7 +26,7 @@ pthread_t chunkThread_id;
26
26
void World_Init (void ) {
27
27
world .mat = LoadMaterialDefault ();
28
28
world .loadChunks = false;
29
- world .drawDistance = 3 ;
29
+ world .drawDistance = 4 ;
30
30
world .chunks = NULL ;
31
31
32
32
world .entities = MemAlloc (WORLD_MAX_ENTITIES * sizeof (Entity ));
@@ -180,7 +180,7 @@ void World_UpdateChunks(void) {
180
180
QueuedChunk * curQueued = world .buildChunksQueue ;
181
181
QueuedChunk * prevQueued = world .buildChunksQueue ;
182
182
183
- int meshUpdatesCount = 16 ;
183
+ int meshUpdatesCount = 4 ;
184
184
185
185
while (curQueued != NULL ) {
186
186
QueuedChunk * nextQueued = curQueued -> next ;
@@ -191,7 +191,7 @@ void World_UpdateChunks(void) {
191
191
chunk -> isBuilding = false;
192
192
world .buildChunksQueue = Chunk_RemoveFromQueue (world .buildChunksQueue , prevQueued , curQueued );
193
193
194
- if (meshUpdatesCount -- == 0 ) return ;
194
+ if (-- meshUpdatesCount == 0 ) return ;
195
195
196
196
curQueued = nextQueued ;
197
197
continue ;
@@ -212,7 +212,7 @@ void World_LoadChunks(void) {
212
212
int loadingHeight = fmin (world .drawDistance , 4 );
213
213
for (int x = - world .drawDistance ; x <= world .drawDistance ; x ++ ) {
214
214
for (int z = - world .drawDistance ; z <= world .drawDistance ; z ++ ) {
215
- for (int y = loadingHeight ; y >= - loadingHeight ; y -- ) {
215
+ for (int y = - loadingHeight ; y <= loadingHeight ; y ++ ) {
216
216
World_AddChunk ((Vector3 ) {pos .x + x , pos .y + y , pos .z + z });
217
217
}
218
218
}
0 commit comments