mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
This commit is contained in:
commit
b724de6ee3
2 changed files with 12 additions and 15 deletions
|
@ -314,12 +314,12 @@ void FVoxelModel::MakeSlabPolys(int x, int y, kvxslab_t *voxptr, FVoxelMap &chec
|
||||||
}
|
}
|
||||||
if (cull & 4)
|
if (cull & 4)
|
||||||
{
|
{
|
||||||
AddFace(x, y, z, x+1, y, z, x, y, z+c, x+1, y, z+c, *col, check);
|
AddFace(x+1, y, z, x, y, z, x+1, y, z+c, x, y, z+c, *col, check);
|
||||||
}
|
}
|
||||||
if (cull & 8)
|
if (cull & 8)
|
||||||
{
|
{
|
||||||
AddFace(x+1, y+1, z, x, y+1, z, x+1, y+1, z+c, x, y+1, z+c, *col, check);
|
AddFace(x, y+1, z, x+1, y+1, z, x, y+1, z+c, x+1, y+1, z+c, *col, check);
|
||||||
}
|
}
|
||||||
z+=c;
|
z+=c;
|
||||||
col+=c;
|
col+=c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,21 +187,18 @@ void GLFlat::DrawSubsector(subsector_t * sub)
|
||||||
unsigned int vi[4];
|
unsigned int vi[4];
|
||||||
|
|
||||||
vi[0] = 0;
|
vi[0] = 0;
|
||||||
for (unsigned int i = 1; i < sub->numlines-1; i += 2)
|
for (unsigned int i = 0; i < sub->numlines - 2; i += 2)
|
||||||
{
|
{
|
||||||
if (i < sub->numlines - 3)
|
for (unsigned int j = 1; j < 4; j++)
|
||||||
{
|
{
|
||||||
for (unsigned int j = 1; j < 4; j++)
|
vi[j] = MIN(i + j, sub->numlines - 1);
|
||||||
{
|
|
||||||
vi[j] = MIN(i + j, sub->numlines - 1);
|
|
||||||
}
|
|
||||||
for (unsigned int x = 0; x < 4; x++)
|
|
||||||
{
|
|
||||||
vertex_t *vt = sub->firstline[vi[x]].v1;
|
|
||||||
qd.Set(x, vt->fX(), plane.plane.ZatPoint(vt) + dz, vt->fY(), vt->fX() / 64.f, -vt->fY() / 64.f);
|
|
||||||
}
|
|
||||||
qd.Render(GL_TRIANGLE_FAN);
|
|
||||||
}
|
}
|
||||||
|
for (unsigned int x = 0; x < 4; x++)
|
||||||
|
{
|
||||||
|
vertex_t *vt = sub->firstline[vi[x]].v1;
|
||||||
|
qd.Set(x, vt->fX(), plane.plane.ZatPoint(vt) + dz, vt->fY(), vt->fX() / 64.f, -vt->fY() / 64.f);
|
||||||
|
}
|
||||||
|
qd.Render(GL_TRIANGLE_FAN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue