Frozen death

From ZDoom Wiki
Jump to navigation Jump to search

The frozen death is an effect originating from Hexen. Players and monsters in that game have a dedicated Ice state, which is reached when they are killed by a weapon, projectile or puff using the Ice damage type.

ZDoom generalized the effect with a GenericFreezeDeath used by actors without their own Ice state. To do so, the A_GenericFreezeDeath codepointer, which gives the frozen actor the prebuild "ice" translation.

Both A_GenericFreezeDeath and A_FreezeDeath turn the victim into an ice corpse. An ice corpse gains the following flags: CANPASS, ICECORPSE, NOBLOOD, PUSHABLE, SHOOTABLE, SLIDESONWALLS, SOLID and TELESTOMP. The fuzz or stealth effect is also removed, and the victim's special is executed.

A falling actor turned into an ice corpse will never enter the Crash state. In addition, ice corpses can be blasted, while regular corpses cannot.

Ice corpses are shattered into IceChunks by the A_FreezeDeathChunks function if they call it while being perfectly motionless (all velocities are NULL). To make sure that this happens eventually, every ice death state should end with a looping call to A_FreezeDeathChunks.

Certain situations are meant to trigger instant shattering, and they do this by setting the ice corpse's velocities to zero as well as changing its tic count before the next state change to 1. These situations include:

  • Being crushed by sector movement, such as a closing door.
  • Landing on a floor with a falling velocity greater than eight map units per tic.
  • Receiving any amount of damage, unless the damage type is Ice.

If a player pawn dies a frozen death, a blue palette flash is used on the screen. When the player's ice corpse shatters, one of the ice chunks will be an IceChunkHead, carrying the player's camera. Once the player corpse has shattered, the resurrect cheat will no longer work.

Note: Since the effect originates from Hexen, it does not exist, by default, in Heretic. The iron lich's ice missiles and ice shards do not inflict ice damage. Of the standard actors, ice damage is used by the wendigo, its own ice missiles and ice shards, the mage's frost shards spell with its missile and shards.

See also