A_GiveShield is an action that gives the target player an shield, which is specified by Var1. Spawning the shield around them and playing the actor's
SeeSound. Any other shield the player might wear is removed to be replaced by the specified shield.
Code – A_GiveShield
// Function: A_GiveShield
// Description: Awards the player a specified shield.
// var1 = Shield type (make with SH_ constants)
// var2 = unused
void A_GiveShield(mobj_t *actor)
UINT16 locvar1 = var1;
if (LUA_CallAction("A_GiveShield", actor))
if (!actor->target || !actor->target->player)
CONS_Debug(DBG_GAMELOGIC, "Powerup has no target.\n");
player = actor->target->player;