A_CheckTotalRings is an action that calls the state specified by Var2 if the number of rings collected so far by all players is greater than or equal to Var1. Unlike
A_CheckRings, rings that were collected and subsequently lost are counted as well.
This action originates from the v2.0 modification SRB2Morphed and was added to SRB2 itself in v2.1.
Code – A_CheckTotalRings
// Function: A_CheckTotalRings
// Description: Calls a state depending on the maximum ammount of rings owned by all players during this try.
// var1 = if total player rings >= var1 call state
// var2 = state number
void A_CheckTotalRings(mobj_t *actor)
INT32 locvar1 = var1;
INT32 locvar2 = var2;
INT32 i, cntr = 0;
if (LUA_CallAction("A_CheckTotalRings", actor))
for (i = 0; i < MAXPLAYERS; i++)
cntr += players[i].totalring;
if (cntr >= locvar1)