Get plane scrolling effects working the same on and off slopes in both renderers again.

This commit is contained in:
toasterbabe 2017-03-30 21:57:36 +01:00
parent 79ec8fbf29
commit d5ba29eb9b
3 changed files with 5 additions and 3 deletions

View File

@ -687,7 +687,7 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
{
// Hurdler: add scrolling texture on floor/ceiling
v3d->sow = (float)((pv->x / fflatsize) - flatxref + scrollx);
v3d->tow = (float)(-(pv->y / fflatsize) + flatyref - scrolly);
v3d->tow = (float)(-(pv->y / fflatsize) + flatyref + scrolly);
//v3d->sow = (float)(pv->x / fflatsize);
//v3d->tow = (float)(pv->y / fflatsize);

View File

@ -5759,12 +5759,12 @@ void P_SpawnSpecials(INT32 fromnetsave)
if (lines[i].flags & ML_NOKNUX) // Set offset through x and y texture offsets if NOKNUX flag is set
{
xoffs = sides[lines[i].sidenum[0]].textureoffset;
yoffs = sides[lines[i].sidenum[0]].rowoffset;
yoffs = -sides[lines[i].sidenum[0]].rowoffset;
}
else // Otherwise, set calculated offsets such that line's v1 is the apparent origin
{
xoffs = -lines[i].v1->x;
yoffs = -lines[i].v1->y;
yoffs = lines[i].v1->y;
}
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)

View File

@ -959,6 +959,8 @@ void R_DrawSinglePlane(visplane_t *pl)
// Okay, look, don't ask me why this works, but without this setup there's a disgusting-looking misalignment with the textures. -Red
const float fudge = ((1<<nflatshiftup)+1.0f)/(1<<nflatshiftup);
yoffs *= 1;
xoffs &= ((1 << (32-nflatshiftup))-1);
yoffs &= ((1 << (32-nflatshiftup))-1);