* Fix a bug regarding bottom face rendering?

N.B. It's not in the original game.  Not sure how they fixed it.
This commit is contained in:
iProgramInCpp
2023-12-05 21:11:34 +02:00
parent a59ae9cc47
commit 5882d2dc7f

View File

@@ -47,10 +47,13 @@ Cube::Cube(ModelPart* a2, int a3, int a4, float x, float y, float z, int d, int
m_faces[0] = PolygonQuad(&m_verts[5], &m_verts[1], &m_verts[2], &m_verts[6], m + f + d, n + f, m + f + d + f, n + f + e); // x2 face
m_faces[1] = PolygonQuad(&m_verts[0], &m_verts[4], &m_verts[7], &m_verts[3], m, n + f, m + f, n + f + e); // x1 face
m_faces[2] = PolygonQuad(&m_verts[5], &m_verts[4], &m_verts[0], &m_verts[1], m + f, n, m + f + d, n + f); // up face
m_faces[3] = PolygonQuad(&m_verts[2], &m_verts[3], &m_verts[7], &m_verts[6], m + f + d, n, m + f + d + d, n + f); // down face
m_faces[3] = PolygonQuad(&m_verts[7], &m_verts[6], &m_verts[2], &m_verts[3], m + f + d, n, m + f + d + d, n + f); // down face*
m_faces[4] = PolygonQuad(&m_verts[1], &m_verts[0], &m_verts[3], &m_verts[2], m + f, n + f, m + f + d, n + f + e); // z1 face
m_faces[5] = PolygonQuad(&m_verts[4], &m_verts[5], &m_verts[6], &m_verts[7], m + f + d + f, n + f, m + f + d + f + d, n + f + e); // z2 face
// *N.B. The original game specifies the vertex ordering as 2, 3, 7, 6, but that renders the back side of the cow upside down.
// This might not be proper form for the face, but we're disabling culling anyway so who cares.
if (a2->field_18)
{
for (int i = 0; i < 6; i++)