Minor refactor

This commit is contained in:
MihailRis
2023-11-15 13:38:42 +03:00
parent aa88fcd7f9
commit be980b2aa6
7 changed files with 21 additions and 17 deletions
+2 -2
View File
@@ -313,7 +313,7 @@ void BlocksRenderer::render(const voxel* voxels, int atlas_size) {
uvfor(def, 2, atlas_size), uvfor(def, 3, atlas_size),
uvfor(def, 4, atlas_size), uvfor(def, 5, atlas_size) };
switch (def.model) {
case BLOCK_MODEL_CUBE:
case BlockModel::block:
if (*((light_t*)&def.emission)) {
blockCube(x, y, z, vec3(1, 1, 1), texfaces, def.drawGroup);
}
@@ -321,7 +321,7 @@ void BlocksRenderer::render(const voxel* voxels, int atlas_size) {
blockCubeShaded(x, y, z, vec3(1, 1, 1), texfaces, &def, vox.states);
}
break;
case BLOCK_MODEL_X_SPRITE: {
case BlockModel::xsprite: {
blockXSprite(x, y, z, vec3(1, 1, 1), texfaces[FACE_MX], texfaces[FACE_MZ], 1.0f);
break;
}