Skip to content
Snippets Groups Projects
Commit 1e6150e7 authored by MascaraSnake's avatar MascaraSnake
Browse files

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

parent 74542358
No related branches found
No related tags found
1 merge request!1885Dynamic slope vertices: Allow untagged vertices which don't move
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment