- added 'floorterrain' and 'ceilingterrain' sector properties for UDMF. These will take precedence over texture based terrain if used.

'ceilingterrain' is needed because the top of 3D-floors refers to the model sector's ceiling, so in order to give a 3D floor a terrain it must be assignable to the sector's ceiling.
Note that although it is basically the same property, its actual function bears no relevance to its use in Eternity.
This commit is contained in:
Christoph Oelckers 2016-01-09 12:10:36 +01:00
commit 71c7f2b42c
19 changed files with 80 additions and 17 deletions

View file

@ -47,6 +47,7 @@
#include "r_data/colormaps.h"
#include "w_wad.h"
#include "p_tags.h"
#include "p_terrain.h"
//===========================================================================
//
@ -1300,6 +1301,7 @@ public:
sec->heightsec = NULL; // sector used to get floor and ceiling height
sec->sectornum = index;
sec->damageinterval = 32;
sec->terrainnum[sector_t::ceiling] = sec->terrainnum[sector_t::floor] = -1;
if (floordrop) sec->Flags = SECF_FLOORDROP;
// killough 3/7/98: end changes
@ -1550,6 +1552,14 @@ public:
Flag(sec->Flags, SECF_HAZARD, key);
break;
case NAME_floorterrain:
sec->terrainnum[sector_t::floor] = P_FindTerrain(CheckString(key));
break;
case NAME_ceilingterrain:
sec->terrainnum[sector_t::ceiling] = P_FindTerrain(CheckString(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.