The game doesn't actually register the player dying, as a split second before the death code runs, the player's health is briefly increased to 1, before being restored to full health as part of the regeneration process. That's all in the code, however, but basically, the player regenerates...