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

This commit is contained in:
MascaraSnake 2022-11-24 22:20:54 +01:00
parent 7454235882
commit 1e6150e7fe

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);