From 7c47cdf16112ed6b15e8a918377156035a166f1e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 26 Jan 2010 19:18:18 +0000 Subject: Fix glass hack windows where a linedef is flagged as two sided but has only one side. Fixes WADs such as OTTAWAU.WAD (thanks Never_Again). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1826 --- src/p_sight.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/p_sight.c') diff --git a/src/p_sight.c b/src/p_sight.c index e192567b..79c1bb1d 100644 --- a/src/p_sight.c +++ b/src/p_sight.c @@ -173,7 +173,7 @@ boolean P_CrossSubsector (int num) continue; line->validcount = validcount; - + v1 = line->v1; v2 = line->v2; s1 = P_DivlineSide (v1->x,v1->y, &strace); @@ -194,6 +194,14 @@ boolean P_CrossSubsector (int num) if (s1 == s2) continue; + // Backsector may be NULL if this is an "impassible + // glass" hack line. + + if (line->backsector == NULL) + { + return false; + } + // stop because it is not two sided anyway // might do this after updating validcount? if ( !(line->flags & ML_TWOSIDED) ) -- cgit v1.2.3