diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt index 835f3780e..3499500ee 100644 --- a/specs/udmf_zdoom.txt +++ b/specs/udmf_zdoom.txt @@ -214,6 +214,9 @@ Note: All fields default to false unless mentioned otherwise. damagehazard = ; // Changes damage model to Strife's delayed damage for the given sector. Default = false. floorterrain = ; // Sets the terrain for the sector's floor. Default = 'use the flat texture's terrain definition.' ceilingterrain = ; // Sets the terrain for the sector's ceiling. Default = 'use the flat texture's terrain definition.' + + floor_reflect = ; // reflectiveness of floor (OpenGL only, not functional on sloped sectors) + ceiling_reflect = ; // reflectiveness of ceiling (OpenGL only, not functional on sloped sectors) portal_ceil_alpha = // translucency of ceiling portal (default is 0 (not visible)) portal_ceil_blocksound = // ceiling portal blocks sound. @@ -406,6 +409,9 @@ Added 'moreids' for linedefs and sectors. added clarification about character encoding added sector damage properties. +1.27 05.01.2016 +floor_reflect and ceiling_reflect. + =============================================================================== EOF =============================================================================== diff --git a/src/namedef.h b/src/namedef.h index 62d513437..61d7303a4 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -575,6 +575,8 @@ xx(damageterraineffect) xx(damagehazard) xx(floorterrain) xx(ceilingterrain) +xx(floor_reflect) +xx(ceiling_reflect) // USDF keywords xx(Amount) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index d3bcc742d..43d1833af 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -4080,6 +4080,13 @@ void P_SetupLevel (const char *lumpname, int position) // set up world state P_SpawnSpecials (); + // disable reflective planes on sloped sectors. + for (auto i = 0; i < numsectors; i++) + { + if (sectors[i].floorplane.isSlope()) sectors[i].reflect[sector_t::floor] = 0; + if (sectors[i].ceilingplane.isSlope()) sectors[i].reflect[sector_t::ceiling] = 0; + } + // This must be done BEFORE the PolyObj Spawn!!! Renderer->PreprocessLevel(); diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 2ef8a9ced..15d1b48d3 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1563,6 +1563,14 @@ public: sec->terrainnum[sector_t::ceiling] = P_FindTerrain(CheckString(key)); break; + case NAME_floor_reflect: + sec->reflect[sector_t::floor] = (float)CheckFloat(key); + break; + + case NAME_ceiling_reflect: + sec->reflect[sector_t::ceiling] = (float)CheckFloat(key); + break; + case NAME_MoreIds: // delay parsing of the tag string until parsing of the sector is complete // This ensures that the ID is always the first tag in the list.