Skip to content

Commit 76c99c4

Browse files
committed
- fix model mirroring
1 parent 0224f4c commit 76c99c4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

DriverLevelTool/viewer/rendermodel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ void CRenderModel::GenerateBuffers()
196196
for (int v = 0; v < numPolyVerts; v++)
197197
{
198198
// NOTE: Vertex indexes is reversed here
199-
#define VERT_IDX numPolyVerts - 1 - v
199+
#define VERT_IDX v//numPolyVerts - 1 - v
200200

201201
int vflags = dec_face.flags & ~(FACE_IS_QUAD | FACE_RGB);
202202

@@ -220,14 +220,14 @@ void CRenderModel::GenerateBuffers()
220220
// get the vertex
221221
SVECTOR* vert = vertex_ref->pVertex(dec_face.vindices[VERT_IDX]);
222222

223-
(*(Vector3D*)&newVert.vx) = Vector3D(vert->x * -EXPORT_SCALING, vert->y * -EXPORT_SCALING, vert->z * EXPORT_SCALING);
223+
(*(Vector3D*)&newVert.vx) = Vector3D(vert->x * EXPORT_SCALING, vert->y * -EXPORT_SCALING, vert->z * EXPORT_SCALING);
224224

225225
if (smooth)
226226
{
227227
vertMap.normalIndex = dec_face.nindices[VERT_IDX];
228228

229229
SVECTOR* norm = vertex_ref->pPointNormal(vertMap.normalIndex);
230-
*(Vector3D*)&newVert.nx = Vector3D(norm->x * -EXPORT_SCALING, norm->y * -EXPORT_SCALING, norm->z * EXPORT_SCALING);
230+
*(Vector3D*)&newVert.nx = Vector3D(norm->x * EXPORT_SCALING, norm->y * -EXPORT_SCALING, norm->z * EXPORT_SCALING);
231231
}
232232

233233
if (dec_face.flags & FACE_TEXTURED)

0 commit comments

Comments
 (0)