mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-07 08:52:01 +00:00
Get plane scrolling effects working the same on and off slopes in both renderers again.
This commit is contained in:
parent
79ec8fbf29
commit
d5ba29eb9b
3 changed files with 5 additions and 3 deletions
|
@ -687,7 +687,7 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
||||||
{
|
{
|
||||||
// Hurdler: add scrolling texture on floor/ceiling
|
// Hurdler: add scrolling texture on floor/ceiling
|
||||||
v3d->sow = (float)((pv->x / fflatsize) - flatxref + scrollx);
|
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->sow = (float)(pv->x / fflatsize);
|
||||||
//v3d->tow = (float)(pv->y / fflatsize);
|
//v3d->tow = (float)(pv->y / fflatsize);
|
||||||
|
|
|
@ -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
|
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;
|
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
|
else // Otherwise, set calculated offsets such that line's v1 is the apparent origin
|
||||||
{
|
{
|
||||||
xoffs = -lines[i].v1->x;
|
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 ;)
|
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
|
||||||
|
|
|
@ -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
|
// 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);
|
const float fudge = ((1<<nflatshiftup)+1.0f)/(1<<nflatshiftup);
|
||||||
|
|
||||||
|
yoffs *= 1;
|
||||||
|
|
||||||
xoffs &= ((1 << (32-nflatshiftup))-1);
|
xoffs &= ((1 << (32-nflatshiftup))-1);
|
||||||
yoffs &= ((1 << (32-nflatshiftup))-1);
|
yoffs &= ((1 << (32-nflatshiftup))-1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue