mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
420: Allow Back Y Offset for timing parameter
This commit is contained in:
parent
36923ae7b0
commit
41fe080a68
1 changed files with 8 additions and 2 deletions
10
src/p_spec.c
10
src/p_spec.c
|
@ -2779,8 +2779,14 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
|
|
||||||
case 420: // Fade light levels in tagged sectors to new value
|
case 420: // Fade light levels in tagged sectors to new value
|
||||||
P_FadeLight(line->tag,
|
P_FadeLight(line->tag,
|
||||||
(line->flags & ML_DONTPEGBOTTOM) ? max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, 255), 0) : line->frontsector->lightlevel,
|
(line->flags & ML_DONTPEGBOTTOM) ? max(sides[line->sidenum[0]].textureoffset>>FRACBITS, 0) : line->frontsector->lightlevel,
|
||||||
(line->flags & ML_DONTPEGBOTTOM) ? max(sides[line->sidenum[0]].rowoffset>>FRACBITS, 0) : P_AproxDistance(line->dx, line->dy)>>FRACBITS,
|
// failsafe: if user specifies Back Y Offset and NOT Front Y Offset, use the Back Offset
|
||||||
|
// to be consistent with other light and fade specials
|
||||||
|
(line->flags & ML_DONTPEGBOTTOM) ?
|
||||||
|
((line->sidenum[1] != 0xFFFF && !(sides[line->sidenum[0]].rowoffset>>FRACBITS)) ?
|
||||||
|
max(min(sides[line->sidenum[1]].rowoffset>>FRACBITS, 255), 0)
|
||||||
|
: max(min(sides[line->sidenum[0]].rowoffset>>FRACBITS, 255), 0))
|
||||||
|
: abs(P_AproxDistance(line->dx, line->dy))>>FRACBITS),
|
||||||
(line->flags & ML_EFFECT4));
|
(line->flags & ML_EFFECT4));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue