Skip to content

Commit

Permalink
Changed: Do not spread objlinks over two-sided linedefs when the midd…
Browse files Browse the repository at this point in the history
…le material on the back side of the spread direction completely fills the gap between floor and ceiling. Fixes the issue seen in Heretic E1M2 where the Undead Warriors hidden behind a one-way wall in sector #83 were sometimes visible from the other side. This also fixes the problem of dynamic lights spreading under similar circumstances.
  • Loading branch information
danij committed Mar 25, 2009
1 parent 2bacbe6 commit eee0c99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/engine/portable/src/p_objlink.c
Expand Up @@ -359,6 +359,12 @@ boolean RIT_ContactFinder(linedef_t* line, void* data)
return true;
}

// Don't spread if the middle material completely fills the gap between
// floor and ceiling (direction is from dest to source).
if(Rend_DoesMidTextureFillGap(line,
dest == line->L_backsector? BACK : FRONT))
return true;

// Calculate 2D distance to line.
vtx = line->L_v1;
distance = ((vtx->V_pos[VY] - params->objPos[VY]) * line->dX -
Expand Down

0 comments on commit eee0c99

Please sign in to comment.