This commit is contained in:
onezplpl 2024-07-17 16:09:04 -04:00
parent 5ddc52405d
commit 35abb02e2f
No known key found for this signature in database
GPG key ID: 7EC026A136F9EEC3
5 changed files with 121 additions and 106 deletions

5
gen.c
View file

@ -158,14 +158,9 @@ struct chunk fetch_chunk(int x, int y, int z, int ci, int h) {
}
void purge_chunks(int ci) {
/*
free(chunks);
chunks = calloc(CBUF_ALL, sizeof(struct chunk));
*/
if (chunks == NULL) {
chunks = calloc(CHUNK_ALL, sizeof(struct chunk));
}
// memset(chunks, 0, sizeof(struct chunk) *CHUNK_ALL);
}
void free_chunks() { free(chunks); }