Change UDMF wall scroll scale to SCROLL_SHIFT

UDMF special 502 now must scale arg 2 and 3 in the same scale
space as line length scrolling in binary format. This
is to ensure compatibility with the binary format.

Fixes STJr/SRB2#862

Co-Authored-By: MascaraSnake <jonassauer27@gmail.com>
This commit is contained in:
Eidolon 2022-05-26 23:38:50 -05:00
parent 0953acca15
commit f94c25c05c
2 changed files with 6 additions and 6 deletions

View file

@ -5552,13 +5552,13 @@ static void P_ConvertBinaryLinedefTypes(void)
lines[i].args[1] = 0;
if (lines[i].flags & ML_NOSKEW)
{
lines[i].args[2] = lines[i].dx >> (FRACBITS + SCROLL_SHIFT);
lines[i].args[3] = lines[i].dy >> (FRACBITS + SCROLL_SHIFT);
lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset >> (FRACBITS - SCROLL_SHIFT);
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset >> (FRACBITS - SCROLL_SHIFT);
}
else
{
lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
lines[i].args[2] = lines[i].dx >> FRACBITS;
lines[i].args[3] = lines[i].dy >> FRACBITS;
}
lines[i].args[4] = lines[i].special - 502;
lines[i].special = 502;

View file

@ -7563,9 +7563,9 @@ static void P_SpawnScrollers(void)
if (s != (INT32)i)
{
if (l->args[1] != TMSD_BACK)
Add_Scroller(sc_side, l->args[2] << FRACBITS, l->args[3] << FRACBITS, control, lines[s].sidenum[0], accel, 0);
Add_Scroller(sc_side, l->args[2] << (FRACBITS - SCROLL_SHIFT), l->args[3] << (FRACBITS - SCROLL_SHIFT), control, lines[s].sidenum[0], accel, 0);
if (l->args[1] != TMSD_FRONT && lines[s].sidenum[1] != 0xffff)
Add_Scroller(sc_side, l->args[2] << FRACBITS, l->args[3] << FRACBITS, control, lines[s].sidenum[1], accel, 0);
Add_Scroller(sc_side, l->args[2] << (FRACBITS - SCROLL_SHIFT), l->args[3] << (FRACBITS - SCROLL_SHIFT), control, lines[s].sidenum[1], accel, 0);
}
break;
}