mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
* Fix diagonal spring ring assortments being forced up/down with slopes.
This commit is contained in:
parent
18e2c2461f
commit
a6a3048c8f
1 changed files with 46 additions and 36 deletions
32
src/p_mobj.c
32
src/p_mobj.c
|
@ -12355,15 +12355,13 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
|||
if (nightsreplace)
|
||||
ringthing = MT_NIGHTSSTAR;
|
||||
|
||||
for (r = 1; r <= 5; r++)
|
||||
{
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
{
|
||||
z = (
|
||||
#ifdef ESLOPE
|
||||
sec->c_slope ? P_GetZAt(sec->c_slope, x, y) :
|
||||
#endif
|
||||
sec->ceilingheight) - mobjinfo[ringthing].height - dist*r;
|
||||
sec->ceilingheight) - mobjinfo[ringthing].height;
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
}
|
||||
|
@ -12373,11 +12371,18 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
|||
#ifdef ESLOPE
|
||||
sec->f_slope ? P_GetZAt(sec->f_slope, x, y) :
|
||||
#endif
|
||||
sec->floorheight) + dist*r;
|
||||
sec->floorheight);
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
}
|
||||
|
||||
for (r = 1; r <= 5; r++)
|
||||
{
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
z -= dist;
|
||||
else
|
||||
z += dist;
|
||||
|
||||
mobj = P_SpawnMobj(x, y, z, ringthing);
|
||||
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
|
@ -12410,18 +12415,13 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
|||
closestangle = FixedAngle(mthing->angle*FRACUNIT);
|
||||
fa = (closestangle >> ANGLETOFINESHIFT);
|
||||
|
||||
for (r = 1; r <= iterations; r++)
|
||||
{
|
||||
x += FixedMul(64*FRACUNIT, FINECOSINE(fa));
|
||||
y += FixedMul(64*FRACUNIT, FINESINE(fa));
|
||||
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
{
|
||||
z = (
|
||||
#ifdef ESLOPE
|
||||
sec->c_slope ? P_GetZAt(sec->c_slope, x, y) :
|
||||
#endif
|
||||
sec->ceilingheight) - mobjinfo[ringthing].height - 64*FRACUNIT*r;
|
||||
sec->ceilingheight) - mobjinfo[ringthing].height;
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
}
|
||||
|
@ -12431,11 +12431,21 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
|||
#ifdef ESLOPE
|
||||
sec->f_slope ? P_GetZAt(sec->f_slope, x, y) :
|
||||
#endif
|
||||
sec->floorheight) + 64*FRACUNIT*r;
|
||||
sec->floorheight);
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
}
|
||||
|
||||
for (r = 1; r <= iterations; r++)
|
||||
{
|
||||
x += FixedMul(64*FRACUNIT, FINECOSINE(fa));
|
||||
y += FixedMul(64*FRACUNIT, FINESINE(fa));
|
||||
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
z -= 64*FRACUNIT;
|
||||
else
|
||||
z += 64*FRACUNIT;
|
||||
|
||||
mobj = P_SpawnMobj(x, y, z, ringthing);
|
||||
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
|
|
Loading…
Reference in a new issue