fix some block render glitches
This commit is contained in:
parent
ed720e0ea0
commit
328be44ed0
1 changed files with 3 additions and 4 deletions
7
cubes.c
7
cubes.c
|
@ -136,13 +136,12 @@ void cubes_free() { free(chunk_old); }
|
|||
|
||||
void cubes_refresh(int x, int y, int z, struct chunk dat) {
|
||||
for (int i = 0; i < CHUNK_ALL; i++) {
|
||||
if (chunk_old[i].exists != 0 && chunk_old[i].x == x &&
|
||||
chunk_old[i].y == y && chunk_old[i].z == z) {
|
||||
if (chunk_old[i].exists != 0 && abs(((int)chunk_old[i].x) - x) <= 1 &&
|
||||
abs(((int)chunk_old[i].y) - y) <= 1 && abs(((int)chunk_old[i].z) - z) <= 1) {
|
||||
chunk_old[i].exists = 0;
|
||||
gen_save(dat);
|
||||
return;
|
||||
}
|
||||
}
|
||||
gen_save(dat);
|
||||
}
|
||||
|
||||
int cubes_vert(struct v3f *cube, struct v3f *text, struct v3f *cubeO,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue