||This article or section is outdated and has not been updated to reflect the release of SRB2 v2.2.
Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.
Rewrite description for 2.2.0
A_MinusCheck is an action which is used to reset the Minus to its digging animation (
SeeState) when it hits the floor. The flags
MF_SHOOTABLE are then removed to prevent the player from harming the actor until they are restored by
A_MinusPopup, and the actor's reaction time is set to
A_MinusDigging this will delay the actor's movement for a second). If the actor has not reached the floor yet, this action checks if the Object is falling and if its current state has an ID number less than that of the
MeleeState, and if so, the actor goes to its
|Returns to this state when Object hits floor
|Falling animation (Object goes to this state if falling, and if current state ID number < |
MeleeState ID number)
Code – A_MinusCheck
// Function: A_MinusCheck
// Description: If the minus hits the floor, dig back into the ground.
// var1 = State to switch to (if 0, use seestate).
// var2 = If not 0, spawn debris when hitting the floor.
void A_MinusCheck(mobj_t *actor)
INT32 locvar1 = var1;
INT32 locvar2 = var2;
if (LUA_CallAction("A_MinusCheck", actor))
if (((actor->eflags & MFE_VERTICALFLIP) && actor->z + actor->height >= actor->ceilingz) || (!(actor->eflags & MFE_VERTICALFLIP) && actor->z <= actor->floorz))
P_SetMobjState(actor, locvar1 ? (statenum_t)locvar1 : actor->info->seestate);
actor->flags = actor->info->flags;
INT32 i, num = 6;
angle_t ani = FixedAngle(FRACUNIT*360/num);
for (i = 1; i <= num; i++)
mobj_t *rock = P_SpawnMobjFromMobj(actor, 0, 0, actor->height/4, MT_ROCKCRUMBLE1);
P_Thrust(rock, ani*i, FRACUNIT);
P_SetObjectMomZ(rock, 3*FRACUNIT, false);