Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-24 15:38:07 +0000
committerStijn Buys <ingar@osirion.org>2008-05-24 15:38:07 +0000
commit00464c237fbd3a01137099dedf23dc44569472fd (patch)
treecc6ccf2bc4f8279b240ae20d4d26c4572029e083 /src/model/mapfile.cc
parent8017d60e4906a27c1dc82933593c3d5fd1c0bed4 (diff)
surface flags: light
Diffstat (limited to 'src/model/mapfile.cc')
-rw-r--r--src/model/mapfile.cc12
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);