mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- enable damage types for Strife's delayed damage. It will always use the type of damage that was last encountered.
This commit is contained in:
parent
eb6c855a95
commit
6afd76e5db
3 changed files with 11 additions and 4 deletions
|
@ -422,6 +422,7 @@ public:
|
|||
int killcount, itemcount, secretcount; // for intermission
|
||||
int damagecount, bonuscount;// for screen flashing
|
||||
int hazardcount; // for delayed Strife damage
|
||||
FName hazardtype; // Damage type of last hazardous damage encounter.
|
||||
int poisoncount; // screen flash for poison damage
|
||||
FName poisontype; // type of poison damage to apply
|
||||
FName poisonpaintype; // type of Pain state to enter for poison damage
|
||||
|
|
|
@ -458,6 +458,7 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
|
|||
if (sector->Flags & SECF_HAZARD)
|
||||
{
|
||||
player->hazardcount += sector->damageamount;
|
||||
player->hazardtype = sector->damagetype;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1231,7 +1232,7 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
|
|||
break;
|
||||
|
||||
case sDamage_Hellslime:
|
||||
P_SetupSectorDamage(sector, 2, 1, 0, NAME_None, SECF_HAZARD);
|
||||
P_SetupSectorDamage(sector, 2, 1, 0, NAME_Slime, SECF_HAZARD);
|
||||
break;
|
||||
|
||||
case Damage_InstantDeath:
|
||||
|
@ -1240,7 +1241,7 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
|
|||
break;
|
||||
|
||||
case sDamage_SuperHellslime:
|
||||
P_SetupSectorDamage(sector, 4, 1, 0, NAME_None, SECF_HAZARD);
|
||||
P_SetupSectorDamage(sector, 4, 1, 0, NAME_Slime, SECF_HAZARD);
|
||||
break;
|
||||
|
||||
case Sector_Hidden:
|
||||
|
|
|
@ -362,6 +362,7 @@ player_t &player_t::operator=(const player_t &p)
|
|||
damagecount = p.damagecount;
|
||||
bonuscount = p.bonuscount;
|
||||
hazardcount = p.hazardcount;
|
||||
hazardtype = p.hazardtype;
|
||||
poisoncount = p.poisoncount;
|
||||
poisontype = p.poisontype;
|
||||
poisonpaintype = p.poisonpaintype;
|
||||
|
@ -2599,7 +2600,7 @@ void P_PlayerThink (player_t *player)
|
|||
{
|
||||
player->hazardcount--;
|
||||
if (!(level.time & 31) && player->hazardcount > 16*TICRATE)
|
||||
P_DamageMobj (player->mo, NULL, NULL, 5, NAME_Slime);
|
||||
P_DamageMobj (player->mo, NULL, NULL, 5, player->hazardtype);
|
||||
}
|
||||
|
||||
if (player->poisoncount && !(level.time & 15))
|
||||
|
@ -3012,7 +3013,11 @@ void player_t::Serialize (FArchive &arc)
|
|||
<< air_finished
|
||||
<< turnticks
|
||||
<< oldbuttons;
|
||||
bool IsBot;
|
||||
if (SaveVersion >= 4929)
|
||||
{
|
||||
arc << hazardtype;
|
||||
}
|
||||
bool IsBot = false;
|
||||
if (SaveVersion >= 4514)
|
||||
{
|
||||
arc << Bot;
|
||||
|
|
Loading…
Reference in a new issue