Merge branch 'dynslope-fix' into 'next'

Dynamic slope vertices: Allow untagged vertices which don't move

Closes #917

See merge request STJr/SRB2!1885
This commit is contained in:
sphere 2022-11-29 11:28:55 +00:00
commit cef1cc3fdc

View file

@ -172,6 +172,9 @@ void T_DynamicSlopeVert (dynvertexplanethink_t* th)
for (i = 0; i < 3; i++)
{
if (!th->secs[i])
continue;
if (th->relative & (1 << i))
th->vex[i].z = th->origvecheights[i] + (th->secs[i]->floorheight - th->origsecheights[i]);
else
@ -205,16 +208,11 @@ static inline void P_AddDynVertexSlopeThinker (pslope_t* slope, const INT16 tags
for (i = 0; i < 3; i++) {
l = Tag_FindLineSpecial(799, tags[i]);
if (l == -1)
{
Z_Free(th);
return;
}
th->secs[i] = lines[l].frontsector;
th->secs[i] = (l == -1) ? NULL : lines[l].frontsector;
th->vex[i] = vx[i];
th->origsecheights[i] = lines[l].frontsector->floorheight;
th->origsecheights[i] = (l == -1) ? 0 : lines[l].frontsector->floorheight;
th->origvecheights[i] = vx[i].z;
if (lines[l].args[0])
if (l != -1 && lines[l].args[0])
th->relative |= 1<<i;
}
P_AddThinker(THINK_DYNSLOPE, &th->thinker);