From 00464c237fbd3a01137099dedf23dc44569472fd Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 24 May 2008 15:38:07 +0000 Subject: surface flags: light --- src/model/mapfile.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/model/mapfile.cc') 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); -- cgit v1.2.3