A_ExtraLife is an action that gives the target player an extra life and plays the extra life music (
XTLIFE). In Mario mode,
sfx_marioa is played instead. If
Use1UpSound is turned on in the
MainCfg block, however,
sfx_oneup is played instead of either of the former. In Match, Tag, CTF and Race, the player receives 100 rings instead of an extra life. In Ultimate mode, the player receives nothing at all and
sfx_lose is played instead. In SRB2, this action is used by the Extra Life Monitor.
Code – A_ExtraLife
// Function: A_ExtraLife
// Description: Awards the player an extra life.
// var1 = unused
// var2 = unused
void A_ExtraLife(mobj_t *actor)
if (LUA_CallAction("A_ExtraLife", actor))
if (!actor->target || !actor->target->player)
CONS_Debug(DBG_GAMELOGIC, "Powerup has no target.\n");
player = actor->target->player;
if (actor->type == MT_1UPICO && !actor->tracer)
actor->frame -= 2; // No lives icon for this player, use the default.
if (ultimatemode) //I don't THINK so!
// In shooter gametypes, give the player 100 rings instead of an extra life.
if (gametype != GT_COOP && gametype != GT_COMPETITION)