Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Optimize: Do not project LT_PLANE-type Lumobjs for glowing Surfaces i…
…n zero-height Sectors.
  • Loading branch information
danij-deng committed Jul 24, 2010
1 parent a9d8082 commit bc65660
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doomsday/engine/portable/src/r_lumobjs.c
Expand Up @@ -3,8 +3,8 @@
* License: GPL
* Online License Link: http://www.gnu.org/licenses/gpl.html
*
*\author Copyright © 2003-2009 Jaakko Keränen <jaakko.keranen@iki.fi>
*\author Copyright © 2006-2009 Daniel Swanson <danij@dengine.net>
*\author Copyright © 2003-2010 Jaakko Keränen <jaakko.keranen@iki.fi>
*\author Copyright © 2006-2010 Daniel Swanson <danij@dengine.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -585,6 +585,11 @@ static boolean createGlowLightForSurface(surface_t* suf, void* paramaters)
sector_t* sec = pln->sector;
lumobj_t* l;
uint i;

// Only produce a light for sectors with open space.
if(sec->SP_floorvisheight >= sec->SP_ceilvisheight)
return true; // Continue iteration.

for(i = 0; i < sec->ssectorCount; ++i)
{
subsector_t* ssec = pln->sector->ssectors[i];
Expand Down

0 comments on commit bc65660

Please sign in to comment.