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

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

View File

@ -203,7 +203,11 @@ Note: All <bool> fields default to false unless mentioned otherwise.
// sound sequence thing in the sector will override this property.
hidden = <bool>; // if true this sector will not be drawn on the textured automap.
waterzone = <bool>; // Sector is under water and swimmable
moreids = <string>; // Additional sector IDs/tags, specified as a space separated list of numbers (e.g. "2 666 1003 4505")
moreids = <string>; // Additional sector IDs/tags, specified as a space separated list of numbers (e.g. "2 666 1003 4505")
damageamount = <int>; // Amount of damage inflicted by this sector, default = 0
damagetype = <string>; // Damage type for sector damage, Default = "None". (generic damage)
damageinterval = <int>; // Interval in tics between damage application, default = 32.
leakiness = <int>; // Probability of leaking through radiation suit (0 = never, 256 = always), default = 0.
* Note about dropactors
@ -377,6 +381,10 @@ Changed language describing the DIALOGUE lump to mention USDF as an option.
1.25 19.04.2015
Added 'moreids' for linedefs and sectors.
1.26 05.01.2016
added clarification about character encoding
added sector damage properties.
===============================================================================
EOF
===============================================================================

View File

@ -506,6 +506,10 @@ xx(floorplane_a)
xx(floorplane_b)
xx(floorplane_c)
xx(floorplane_d)
xx(damageamount)
xx(damagetype)
xx(damageinterval)
xx(leakiness)
// USDF keywords
xx(Amount)

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.