diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index fb9858bc2..8fa8691b2 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2276,7 +2276,7 @@ FUNC(LS_Sector_SetDamage) } } sectors[secnum].damageamount = (short)arg1; - sectors[secnum].damagemod = (short)arg2; + sectors[secnum].damagetype = MODtoDamageType(arg2); sectors[secnum].damageinterval = (short)arg3; sectors[secnum].leakydamage = (short)arg4; } diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 462c1e757..fdf57ddb0 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -369,15 +369,18 @@ void P_SerializeWorld (FArchive &arc) << sec->heightsec << sec->bottommap << sec->midmap << sec->topmap << sec->gravity - << sec->damageamount - << sec->damagemod; + << sec->damageamount; if (SaveVersion >= 4528) { arc << sec->damageinterval - << sec->leakydamage; + << sec->leakydamage + << sec->damagetype; } else { + short damagemod; + arc << damagemod; + sec->damagetype = MODtoDamageType(damagemod); if (sec->damageamount < 20) { sec->leakydamage = 0; diff --git a/src/p_spec.cpp b/src/p_spec.cpp index e0b11dd7e..c439ac50e 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -570,7 +570,7 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector) { if (level.time % sector->damageinterval == 0 && (ironfeet == NULL || pr_playerinspecialsector() < sector->leakydamage)) { - P_DamageMobj (player->mo, NULL, NULL, sector->damageamount, MODtoDamageType (sector->damagemod)); + P_DamageMobj (player->mo, NULL, NULL, sector->damageamount, sector->damagetype); } } @@ -1439,7 +1439,7 @@ void P_SpawnSpecials (void) { sector_t *sec = §ors[s]; sec->damageamount = damage; - sec->damagemod = 0;//MOD_UNKNOWN; + sec->damagetype = NAME_None; if (sec->damageamount < 20) { sec->leakydamage = 0; diff --git a/src/r_defs.h b/src/r_defs.h index 2360328e6..89449f446 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -710,8 +710,8 @@ struct sector_t struct msecnode_t *touching_thinglist; // phares 3/14/98 float gravity; // [RH] Sector gravity (1.0 is normal) + FNameNoInit damagetype; // [RH] Means-of-death for applied damage short damageamount; // [RH] Damage to do while standing on floor - short damagemod; // [RH] Means-of-death for applied damage short damageinterval; // Interval for damage application short leakydamage; // chance of leaking through radiation suit