Skip to content

Commit 832e263

Browse files
committed
- fix model compiler bug
1 parent f457ab3 commit 832e263

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

DriverLevelTool/model_compiler/compiler.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,13 @@ void WritePolygonNormals(IVirtualStream* stream, MODEL* model, smdgroup_t* group
402402
SVECTOR* v3 = model->pVertex(poly.vindices[2]);
403403

404404
Vector3D normal;
405+
Vector3D fv1, fv2, fv3;
405406

406-
ComputeTriangleNormal(normal,
407-
Vector3D((float)v1->x, (float)v1->y, (float)v1->z),
408-
Vector3D((float)v2->x, (float)v2->y, (float)v2->z),
409-
Vector3D((float)v3->x, (float)v3->y, (float)v3->z));
407+
fv1 = Vector3D((float)v1->x, (float)v1->y, (float)v1->z);
408+
fv2 = Vector3D((float)v2->x, (float)v2->y, (float)v2->z);
409+
fv3 = Vector3D((float)v3->x, (float)v3->y, (float)v3->z);
410+
411+
ComputeTriangleNormal(fv1,fv2,fv3,normal);
410412

411413
// Invert normals (REQUIRED)
412414
normal *= -1.0f;

0 commit comments

Comments
 (0)