A_Mushroom
From DoomWiki.org
![]() | This article or section is a stub. Please help the Doom Wiki by adding to it. |
A_Mushroom is a code pointer first introduced with the MBF source port. It is a variant of A_Explode with the additional effect of spawning several fireballs (mancubus projectiles, but with the NOGRAVITY flag removed). The function uses the "missile damage" property of the object to determine how many fireballs are thrown, using the square of the quarter + 1 of the damage value. For example, if damage is 20, it will spawn 36 fireballs.
The misc1 and misc2 ("Unknown 1" and "Unknown 2" in DeHackEd) values of the state where the code pointer is used, if not null, are interpreted as fixed point values for the slope at which the fireball is thrown, and a speed multiplier for the projectile based on its normal speed. If these values are null, the defaults are a slope of 4.0 (corresponding to a 400% slope) and speed of 0.5 (half speed). Since the projectile is affected by gravity, this is only the initial slope; the projectile will follow a parabolic trajectory.
Example[edit]
The following is how A_Mushroom
is used in the DEHACKED lump of MBFEDIT!.WAD, by Len Pitre.
Frame 777 Sprite subnumber = 3 Duration = 2 Next frame = 777 Pointer 426 (x 777) Codep frame = 1075 #This puppy's the mushroom codepointer. Notice that frame 777 loops back on #itself every two frames. This is what keeps the explosion going constantly.
External links[edit]
- A_Mushroom in the WinMBF source code.
- A_Mushroom at the ZDoom wiki
- Mushroom at the Eternity Engine wiki