mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Fixed and simplified the big fern leaf spawning code
This commit is contained in:
parent
17a2d1071c
commit
defffd667e
1 changed files with 5 additions and 5 deletions
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -12090,14 +12090,14 @@ ML_EFFECT5 : Don't stop thinking when too far away
|
|||
break;
|
||||
case MT_BIGFERN:
|
||||
{
|
||||
angle_t angle = FixedAngle((mthing->angle % 45) << FRACBITS);
|
||||
angle_t angle = FixedAngle(mthing->angle << FRACBITS);
|
||||
UINT8 i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
UINT8 j = (i + 2) % 8;
|
||||
fixed_t xoffs = (j % 4) ? FRACUNIT : 0;
|
||||
fixed_t yoffs = (i % 4) ? FRACUNIT : 0;
|
||||
mobj_t *leaf = P_SpawnMobjFromMobj(mobj, (j > 3) ? -xoffs : xoffs, (i > 3) ? -yoffs : yoffs, 0, MT_BIGFERNLEAF);
|
||||
angle_t fa = (angle >> ANGLETOFINESHIFT) & FINEMASK;
|
||||
fixed_t xoffs = FINECOSINE(fa);
|
||||
fixed_t yoffs = FINESINE(fa);
|
||||
mobj_t *leaf = P_SpawnMobjFromMobj(mobj, xoffs, yoffs, 0, MT_BIGFERNLEAF);
|
||||
leaf->angle = angle;
|
||||
angle += ANGLE_45;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue