From dfd2a379b15620562cd7563b74f429498f195989 Mon Sep 17 00:00:00 2001 From: plagman Date: Tue, 14 Apr 2009 07:01:55 +0000 Subject: [PATCH] Don't propagate light through sealed portals. git-svn-id: https://svn.eduke32.com/eduke32@1318 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 85c5fcff8..40b333709 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -3865,6 +3865,14 @@ static inline void polymer_culllight(char lightindex) light->isinview = 1; } if (polymer_planeinlight(&w->mask, light)) { + if ((w->mask.vertcount == 4) && + (w->mask.buffer[(0 * 5) + 1] >= w->mask.buffer[(3 * 5) + 1]) && + (w->mask.buffer[(1 * 5) + 1] >= w->mask.buffer[(2 * 5) + 1])) + { + i++; + continue; + } + w->mask.lights[w->mask.lightcount] = lightindex; w->mask.lightcount++; if (w->mask.drawn)