Display "Last Chance!" when death-save combo rules activate

Future conveyance work here would rule, but at the very least, let's name it so we can talk about it
This commit is contained in:
AJ Martinez 2024-03-31 00:07:32 -07:00
parent 193c85a418
commit 7d2046f9f9

View file

@ -46,6 +46,7 @@
#include "k_powerup.h" #include "k_powerup.h"
#include "k_collide.h" #include "k_collide.h"
#include "m_easing.h" #include "m_easing.h"
#include "k_hud.h" // K_AddMessage
// CTF player names // CTF player names
@ -3315,6 +3316,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
// Death save! On your last hit, no matter what, demote to weakest damage type for one last escape chance. // Death save! On your last hit, no matter what, demote to weakest damage type for one last escape chance.
if (player->mo->health == 2 && damage && gametyperules & GTR_BUMPERS) if (player->mo->health == 2 && damage && gametyperules & GTR_BUMPERS)
{ {
K_AddMessageForPlayer(player, "\x8DLast Chance!", false, false);
S_StartSound(target, sfx_gshc7); S_StartSound(target, sfx_gshc7);
player->flashing = TICRATE; player->flashing = TICRATE;
type = DMG_STUMBLE; type = DMG_STUMBLE;