- allow setting the sector's damage properties through UDMF.

This commit is contained in:
Christoph Oelckers 2016-01-05 16:19:55 +01:00
commit 2b519a92b1
3 changed files with 32 additions and 1 deletions

View file

@ -1299,6 +1299,8 @@ public:
sec->prevsec = -1; // stair retriggering until build completes
sec->heightsec = NULL; // sector used to get floor and ceiling height
sec->sectornum = index;
sec->damageinterval = 32;
sec->leakydamage = 5;
if (floordrop) sec->Flags = SECF_FLOORDROP;
// killough 3/7/98: end changes
@ -1524,6 +1526,23 @@ public:
cp[3] = CheckFloat(key);
break;
case NAME_damageamount:
sec->damageamount = CheckInt(key);
break;
case NAME_damagetype:
sec->damagetype = CheckString(key);
break;
case NAME_damageinterval:
sec->damageinterval = CheckInt(key);
if (sec->damageinterval < 1) sec->damageinterval = 1;
break;
case NAME_leakiness:
sec->leakydamage = CheckInt(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.