diff options
Diffstat (limited to 'src/model/mapfile.cc')
-rw-r--r-- | src/model/mapfile.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc index 6252886..922e2db 100644 --- a/src/model/mapfile.cc +++ b/src/model/mapfile.cc @@ -169,7 +169,7 @@ bool MapFile::getline() { for (int i=0; i < 5; i++) linestream >> tmp; - // surface flags ? + // content flags ? if (!(linestream >> n)) n = 0; @@ -177,6 +177,12 @@ bool MapFile::getline() { plane->texture() = texture; if (n > 0) plane->detail() = true; + + // surface flags + if (!(linestream >> n)) + n = 0; + plane->surface_flags() = n; + planes.push_back(plane); } value_current.clear(); @@ -431,6 +437,10 @@ void MapFile::make_brushface(Plane *face) // evertices will be added to the VertexArray after normal vertices Triangle *triangle = new Triangle(*(*vn1), *(*vn), *(*v0), n, 0, face->detail()); class_etris.push_back(triangle); + } else if ((face->surface_flags() & 1) == 1 ) { + // lvertices + Triangle *triangle = new Triangle(*(*vn1), *(*vn), *(*v0), n, color, face->detail()); + class_ltris.push_back(triangle); } else { Triangle *triangle = new Triangle(*(*vn1), *(*vn), *(*v0), n, color, face->detail()); class_tris.push_back(triangle); |