custom model format changes
This commit is contained in:
@@ -59,7 +59,7 @@ void BlocksPreview::draw(const Block* def, int x, int y, int size, glm::vec4 tin
|
||||
batch->blockCube(def->hitbox.size() * glm::vec3(size * 0.63f),
|
||||
texfaces, tint, !def->rt.emissive);
|
||||
break;
|
||||
case BlockModel::customfaces:
|
||||
case BlockModel::custom:
|
||||
case BlockModel::xsprite: {
|
||||
glm::vec3 right = glm::normalize(glm::vec3(1.f, 0.f, -1.f));
|
||||
batch->sprite(right*float(size)*0.43f+glm::vec3(0, size*0.4f, 0),
|
||||
|
||||
@@ -23,14 +23,14 @@ ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets) {
|
||||
sideregions[i * 6 + side] = atlas->get("notfound");
|
||||
}
|
||||
}
|
||||
for (uint side = 0; side < def->textureMoreFaces.size(); side++)
|
||||
for (uint side = 0; side < def->modelTextures.size(); side++)
|
||||
{
|
||||
std::string tex = def->textureMoreFaces[side];
|
||||
std::string tex = def->modelTextures[side];
|
||||
if (atlas->has(tex)) {
|
||||
def->customfacesExtraUVs.push_back(atlas->get(tex));
|
||||
def->modelUVs.push_back(atlas->get(tex));
|
||||
} else {
|
||||
if (atlas->has("notfound"))
|
||||
def->customfacesExtraUVs.push_back(atlas->get("notfound"));
|
||||
def->modelUVs.push_back(atlas->get("notfound"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user