printz
CRAZY DUMB ZEALOT

Posts: 6129
Registered: 06-06 |
PrBoom doesn't use the misc1 and misc2 frame parameters in A_Mushroom. Normally those two should control the angle and speed factor of the fireballs, but it doesn't happen here. Here's the code in p_enemy.c in WinMBF:
code:
//
// killough 9/98: a mushroom explosion effect, sorta :)
// Original idea: Linguica
//
void A_Mushroom(mobj_t *actor)
{
int i, j, n = actor->info->damage;
// Mushroom parameters are part of code pointer's state
fixed_t misc1 = actor->state->misc1 ? actor->state->misc1 : FRACUNIT*4;
fixed_t misc2 = actor->state->misc2 ? actor->state->misc2 : FRACUNIT/2;
A_Explode(actor); // make normal explosion
for (i = -n; i <= n; i += 8) // launch mushroom cloud
for (j = -n; j <= n; j += 8)
{
mobj_t target = *actor, *mo;
target.x += i << FRACBITS; // Aim in many directions from source
target.y += j << FRACBITS;
target.z += P_AproxDistance(i,j) * misc1; // Aim fairly high
mo = P_SpawnMissile(actor, &target, MT_FATSHOT); // Launch fireball
mo->momx = FixedMul(mo->momx, misc2);
mo->momy = FixedMul(mo->momy, misc2); // Slow down a bit
mo->momz = FixedMul(mo->momz, misc2);
mo->flags &= ~MF_NOGRAVITY; // Make debris fall under gravity
}
}
|