From 6a37b3c0c66ee30ecdcc67b8bad793d97c12c70d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias <alam@srb2.org> Date: Sun, 15 Oct 2023 20:30:06 -0400 Subject: [PATCH] Update src/hardware/mw_model.c Restore old code in GeneratePolygonNormals(), add TODO --- src/hardware/hw_model.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hardware/hw_model.c b/src/hardware/hw_model.c index 9319939c0..4b6bce6f7 100644 --- a/src/hardware/hw_model.c +++ b/src/hardware/hw_model.c @@ -663,6 +663,7 @@ void GeneratePolygonNormals(model_t *model, int ztag) { int k; mdlframe_t *frame = &mesh->frames[j]; + const float *vertices = frame->vertices; vector_t *polyNormals; frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0); @@ -671,6 +672,11 @@ void GeneratePolygonNormals(model_t *model, int ztag) for (k = 0; k < mesh->numTriangles; k++) { + /// TODO: normalize vectors + (void)vertices; + (void)polyNormals; +// Vector::Normal(vertices, polyNormals); + vertices += 3 * 3; polyNormals++; } } -- GitLab