diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-24 15:38:07 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-24 15:38:07 +0000 |
commit | 00464c237fbd3a01137099dedf23dc44569472fd (patch) | |
tree | cc6ccf2bc4f8279b240ae20d4d26c4572029e083 /src/model/mapfile.cc | |
parent | 8017d60e4906a27c1dc82933593c3d5fd1c0bed4 (diff) |
surface flags: light
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); |