|
This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.
|
A_ToggleFlameJet is an action designed to turn flame jets on and off. The actors's threshold value determines the amount of time in tics the flame jet will be on, and the actor's movecount value determines the amount of time in tics the flame jet will be off; otherwise, the duration of the calling state is used instead.
Code – A_ToggleFlameJet
|
|
// Function: A_ToggleFlameJet
//
// Description: Turns a flame jet on and off.
//
// var1 = unused
// var2 = unused
//
void A_ToggleFlameJet(mobj_t* actor)
{
#ifdef HAVE_BLUA
if (LUA_CallAction("A_ToggleFlameJet", actor))
return;
#endif
// threshold - off delay
// movecount - on timer
if (actor->flags2 & MF2_FIRING)
{
actor->flags2 &= ~MF2_FIRING;
if (actor->threshold)
actor->tics = actor->threshold;
}
else
{
actor->flags2 |= MF2_FIRING;
if (actor->movecount)
actor->tics = actor->movecount;
}
}
|
|