* Fix diagonal spring ring assortments being forced up/down with slopes.
This commit is contained in:
parent
18e2c2461f
commit
a6a3048c8f
82
src/p_mobj.c
82
src/p_mobj.c
|
@ -12355,28 +12355,33 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
||||||
if (nightsreplace)
|
if (nightsreplace)
|
||||||
ringthing = MT_NIGHTSSTAR;
|
ringthing = MT_NIGHTSSTAR;
|
||||||
|
|
||||||
|
if (mthing->options & MTF_OBJECTFLIP)
|
||||||
|
{
|
||||||
|
z = (
|
||||||
|
#ifdef ESLOPE
|
||||||
|
sec->c_slope ? P_GetZAt(sec->c_slope, x, y) :
|
||||||
|
#endif
|
||||||
|
sec->ceilingheight) - mobjinfo[ringthing].height;
|
||||||
|
if (mthing->options >> ZSHIFT)
|
||||||
|
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
z = (
|
||||||
|
#ifdef ESLOPE
|
||||||
|
sec->f_slope ? P_GetZAt(sec->f_slope, x, y) :
|
||||||
|
#endif
|
||||||
|
sec->floorheight);
|
||||||
|
if (mthing->options >> ZSHIFT)
|
||||||
|
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
|
}
|
||||||
|
|
||||||
for (r = 1; r <= 5; r++)
|
for (r = 1; r <= 5; r++)
|
||||||
{
|
{
|
||||||
if (mthing->options & MTF_OBJECTFLIP)
|
if (mthing->options & MTF_OBJECTFLIP)
|
||||||
{
|
z -= dist;
|
||||||
z = (
|
|
||||||
#ifdef ESLOPE
|
|
||||||
sec->c_slope ? P_GetZAt(sec->c_slope, x, y) :
|
|
||||||
#endif
|
|
||||||
sec->ceilingheight) - mobjinfo[ringthing].height - dist*r;
|
|
||||||
if (mthing->options >> ZSHIFT)
|
|
||||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
z += dist;
|
||||||
z = (
|
|
||||||
#ifdef ESLOPE
|
|
||||||
sec->f_slope ? P_GetZAt(sec->f_slope, x, y) :
|
|
||||||
#endif
|
|
||||||
sec->floorheight) + dist*r;
|
|
||||||
if (mthing->options >> ZSHIFT)
|
|
||||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
|
||||||
}
|
|
||||||
|
|
||||||
mobj = P_SpawnMobj(x, y, z, ringthing);
|
mobj = P_SpawnMobj(x, y, z, ringthing);
|
||||||
|
|
||||||
|
@ -12410,31 +12415,36 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
||||||
closestangle = FixedAngle(mthing->angle*FRACUNIT);
|
closestangle = FixedAngle(mthing->angle*FRACUNIT);
|
||||||
fa = (closestangle >> ANGLETOFINESHIFT);
|
fa = (closestangle >> ANGLETOFINESHIFT);
|
||||||
|
|
||||||
|
if (mthing->options & MTF_OBJECTFLIP)
|
||||||
|
{
|
||||||
|
z = (
|
||||||
|
#ifdef ESLOPE
|
||||||
|
sec->c_slope ? P_GetZAt(sec->c_slope, x, y) :
|
||||||
|
#endif
|
||||||
|
sec->ceilingheight) - mobjinfo[ringthing].height;
|
||||||
|
if (mthing->options >> ZSHIFT)
|
||||||
|
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
z = (
|
||||||
|
#ifdef ESLOPE
|
||||||
|
sec->f_slope ? P_GetZAt(sec->f_slope, x, y) :
|
||||||
|
#endif
|
||||||
|
sec->floorheight);
|
||||||
|
if (mthing->options >> ZSHIFT)
|
||||||
|
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
|
}
|
||||||
|
|
||||||
for (r = 1; r <= iterations; r++)
|
for (r = 1; r <= iterations; r++)
|
||||||
{
|
{
|
||||||
x += FixedMul(64*FRACUNIT, FINECOSINE(fa));
|
x += FixedMul(64*FRACUNIT, FINECOSINE(fa));
|
||||||
y += FixedMul(64*FRACUNIT, FINESINE(fa));
|
y += FixedMul(64*FRACUNIT, FINESINE(fa));
|
||||||
|
|
||||||
if (mthing->options & MTF_OBJECTFLIP)
|
if (mthing->options & MTF_OBJECTFLIP)
|
||||||
{
|
z -= 64*FRACUNIT;
|
||||||
z = (
|
|
||||||
#ifdef ESLOPE
|
|
||||||
sec->c_slope ? P_GetZAt(sec->c_slope, x, y) :
|
|
||||||
#endif
|
|
||||||
sec->ceilingheight) - mobjinfo[ringthing].height - 64*FRACUNIT*r;
|
|
||||||
if (mthing->options >> ZSHIFT)
|
|
||||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
z += 64*FRACUNIT;
|
||||||
z = (
|
|
||||||
#ifdef ESLOPE
|
|
||||||
sec->f_slope ? P_GetZAt(sec->f_slope, x, y) :
|
|
||||||
#endif
|
|
||||||
sec->floorheight) + 64*FRACUNIT*r;
|
|
||||||
if (mthing->options >> ZSHIFT)
|
|
||||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
|
||||||
}
|
|
||||||
|
|
||||||
mobj = P_SpawnMobj(x, y, z, ringthing);
|
mobj = P_SpawnMobj(x, y, z, ringthing);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue