mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +00:00
- Skip 3D floors in the textured automap that are not set to draw their planes.
- Fixed: The textured automap also needs to take the texture origin for 3D floors from the control sector. SVN r3978 (trunk)
This commit is contained in:
parent
736c7f093a
commit
b1543fdc08
1 changed files with 13 additions and 7 deletions
|
@ -1614,6 +1614,7 @@ void AM_drawSubsectors()
|
||||||
fixed_t scalex, scaley;
|
fixed_t scalex, scaley;
|
||||||
double originx, originy;
|
double originx, originy;
|
||||||
FDynamicColormap *colormap;
|
FDynamicColormap *colormap;
|
||||||
|
mpoint_t originpt;
|
||||||
|
|
||||||
for (int i = 0; i < numsubsectors; ++i)
|
for (int i = 0; i < numsubsectors; ++i)
|
||||||
{
|
{
|
||||||
|
@ -1642,11 +1643,9 @@ void AM_drawSubsectors()
|
||||||
// For lighting and texture determination
|
// For lighting and texture determination
|
||||||
sector_t *sec = Renderer->FakeFlat (subsectors[i].render_sector, &tempsec, &floorlight, &ceilinglight, false);
|
sector_t *sec = Renderer->FakeFlat (subsectors[i].render_sector, &tempsec, &floorlight, &ceilinglight, false);
|
||||||
// Find texture origin.
|
// Find texture origin.
|
||||||
mpoint_t originpt = { -sec->GetXOffset(sector_t::floor) >> FRACTOMAPBITS,
|
originpt.x = -sec->GetXOffset(sector_t::floor) >> FRACTOMAPBITS;
|
||||||
sec->GetYOffset(sector_t::floor) >> FRACTOMAPBITS };
|
originpt.y = sec->GetYOffset(sector_t::floor) >> FRACTOMAPBITS;
|
||||||
rotation = 0 - sec->GetAngle(sector_t::floor);
|
rotation = 0 - sec->GetAngle(sector_t::floor);
|
||||||
originx = f_x + ((originpt.x - m_x) * scale / float(1 << 24));
|
|
||||||
originy = f_y + (f_h - (originpt.y - m_y) * scale / float(1 << 24));
|
|
||||||
// Coloring for the polygon
|
// Coloring for the polygon
|
||||||
colormap = sec->ColorMap;
|
colormap = sec->ColorMap;
|
||||||
|
|
||||||
|
@ -1690,6 +1689,7 @@ void AM_drawSubsectors()
|
||||||
F3DFloor *rover = sec->e->XFloor.ffloors[i];
|
F3DFloor *rover = sec->e->XFloor.ffloors[i];
|
||||||
if (!(rover->flags & FF_EXISTS)) continue;
|
if (!(rover->flags & FF_EXISTS)) continue;
|
||||||
if (rover->flags & FF_FOG) continue;
|
if (rover->flags & FF_FOG) continue;
|
||||||
|
if (!(rover->flags & FF_RENDERPLANES)) continue;
|
||||||
if (rover->alpha == 0) continue;
|
if (rover->alpha == 0) continue;
|
||||||
double roverz = rover->top.plane->ZatPoint(secx, secy);
|
double roverz = rover->top.plane->ZatPoint(secx, secy);
|
||||||
// Ignore 3D floors that are above or below the sector itself:
|
// Ignore 3D floors that are above or below the sector itself:
|
||||||
|
@ -1701,9 +1701,13 @@ void AM_drawSubsectors()
|
||||||
{
|
{
|
||||||
maptex = *(rover->top.texture);
|
maptex = *(rover->top.texture);
|
||||||
floorplane = rover->top.plane;
|
floorplane = rover->top.plane;
|
||||||
rotation = 0 - rover->top.model->GetAngle(sector_t::ceiling);
|
sector_t *model = rover->top.model;
|
||||||
scalex = rover->top.model->GetXScale(sector_t::ceiling);
|
int selector = (rover->flags & FF_INVERTPLANES) ? sector_t::floor : sector_t::ceiling;
|
||||||
scaley = rover->top.model->GetYScale(sector_t::ceiling);
|
rotation = 0 - model->GetAngle(selector);
|
||||||
|
scalex = model->GetXScale(selector);
|
||||||
|
scaley = model->GetYScale(selector);
|
||||||
|
originpt.x = -model->GetXOffset(selector) >> FRACTOMAPBITS;
|
||||||
|
originpt.y = model->GetYOffset(selector) >> FRACTOMAPBITS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1713,6 +1717,8 @@ void AM_drawSubsectors()
|
||||||
colormap = light->extra_colormap;
|
colormap = light->extra_colormap;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
originx = f_x + ((originpt.x - m_x) * scale / float(1 << 24));
|
||||||
|
originy = f_y + (f_h - (originpt.y - m_y) * scale / float(1 << 24));
|
||||||
// Apply the floor's rotation to the texture origin.
|
// Apply the floor's rotation to the texture origin.
|
||||||
if (rotation != 0)
|
if (rotation != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue