|
Note This action is designed only for Objects of type MT_EGGMOBILE4 (Egg Colosseum), and will not have the same effect for other types of Objects.
|
|
This article or section is outdated and has not been fully updated to reflect the current version of SRB2.
Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.
|
|
To do Update for 2.2.0:
- Var2 is the sound to play in pinch now
- Some technical stuff to do with
movedir has been added, if you really want to document that
|
A_Boss4Reverse is an action used by the Egg Colosseum to signal when to reverse the direction its spikeball arms spin around it; this is done by setting the actor's movedir value to 1 (clockwise) or 2 (counter-clockwise). The action's reaction time is also set to 0, so the spikeball arms rotate at the normal speed. Var1 determines the sound to play as it does this.
Code – A_Boss4Reverse
|
|
// Function: A_Boss4Reverse
//
// Description: Reverse arms direction.
//
// var1 = sfx to play
// var2 = sfx to play in pinch
//
void A_Boss4Reverse(mobj_t *actor)
{
sfxenum_t locvar1 = (sfxenum_t)var1;
sfxenum_t locvar2 = (sfxenum_t)var2;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_Boss4Reverse", actor))
return;
#endif
actor->reactiontime = 0;
if (actor->movedir < 3)
{
S_StartSound(NULL, locvar1);
if (actor->movedir == 1)
actor->movedir = 2;
else
actor->movedir = 1;
}
else
{
S_StartSound(NULL, locvar2);
if (actor->movedir == 4)
actor->movedir = 5;
else
actor->movedir = 4;
actor->angle += ANGLE_180;
actor->movefactor = -actor->movefactor;
}
}
|
|