diff options
Diffstat (limited to 'src/model/map.cc')
-rw-r--r-- | src/model/map.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/model/map.cc b/src/model/map.cc index 8165e3a..9cb5295 100644 --- a/src/model/map.cc +++ b/src/model/map.cc @@ -434,16 +434,13 @@ void Map::make_brushface(Plane *face) if (vl.size() > 2) { - Material *material = Material::find(face->texture()); + Material *material = Material::find("textures/" + face->texture()); + if (!material) { - material = new Material(face->texture()); + material = new Material("textures/" + face->texture()); Material::add(material); - material->set_color(math::Color(1.0, 0.0f, 1.0f)); - material->set_flags(Material::Bright); - - // don't show material warnings on a dedicated server - if (VertexArray::instance()) - con_warn << "Unkown material '" << face->texture() << "'" << std::endl; + material->set_flags(Material::Texture); + material->set_texture(material->name()); } // find the list if primitives for the current material, allocate a new one if necessary |