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_1UP_ICON && actor->tracer)
// We're using the overlay, so use the overlay 1up sprite (no text)
actor->sprite = SPR_TV1P;
if (ultimatemode) //I don't THINK so!
P_GiveCoopLives(player, 1, true);