Fixed stud rendering bug in pieces with a large number of vertices.

This commit is contained in:
leo 2012-02-14 00:11:33 +00:00
parent b86a9c1b9c
commit fe7cb940b8

View file

@ -824,12 +824,12 @@ void PieceInfo::LoadInformation()
for (i = 0; i < SIDES; i++)
{
longs[j+i*3] = (lcuint16)verts + 2*SIDES;
longs[1+j+i*3] = (lcuint16)verts + SIDES + i;
longs[j+i*3] = (lcuint32)verts + 2*SIDES;
longs[1+j+i*3] = (lcuint32)verts + SIDES + i;
if (i == SIDES-1)
longs[2+j+i*3] = (lcuint16)verts + SIDES;
longs[2+j+i*3] = (lcuint32)verts + SIDES;
else
longs[2+j+i*3] = (lcuint16)verts + SIDES + i + 1;
longs[2+j+i*3] = (lcuint32)verts + SIDES + i + 1;
}
j += 3*SIDES;
@ -1215,11 +1215,11 @@ void PieceInfo::LoadInformation()
for (i = 0; i < SIDES; i++)
{
if (i == SIDES-1)
longs[j+i*3] = (lcuint16)verts + SIDES;
longs[j+i*3] = (lcuint32)verts + SIDES;
else
longs[j+i*3] = (lcuint16)verts + SIDES + i + 1;
longs[1+j+i*3] = (lcuint16)verts + SIDES + i;
longs[2+j+i*3] = (lcuint16)verts + 2*SIDES;
longs[j+i*3] = (lcuint32)verts + SIDES + i + 1;
longs[1+j+i*3] = (lcuint32)verts + SIDES + i;
longs[2+j+i*3] = (lcuint32)verts + 2*SIDES;
}
j += 3*SIDES;