At FF and Sphere's suggestion, make the ring hoops work natively in normal stages and require more replacing for special stage conversion purposes.

This commit is contained in:
toaster 2018-06-09 21:42:37 +01:00
parent 94b2ad2836
commit c5ab2ffa11

View file

@ -10809,6 +10809,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
sector_t *sec; sector_t *sec;
TVector v, *res; TVector v, *res;
angle_t closestangle, fa; angle_t closestangle, fa;
boolean nightsreplace = ((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap));
x = mthing->x << FRACBITS; x = mthing->x << FRACBITS;
y = mthing->y << FRACBITS; y = mthing->y << FRACBITS;
@ -11095,7 +11096,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
if (ultimatemode) if (ultimatemode)
return; // No rings in Ultimate! return; // No rings in Ultimate!
if ((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap)) if (nightsreplace)
ringthing = MT_NIGHTSSTAR; ringthing = MT_NIGHTSSTAR;
for (r = 1; r <= 5; r++) for (r = 1; r <= 5; r++)
@ -11147,7 +11148,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
if (ultimatemode) if (ultimatemode)
return; // No rings in Ultimate! return; // No rings in Ultimate!
if ((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap)) if (nightsreplace)
ringthing = MT_NIGHTSSTAR; ringthing = MT_NIGHTSSTAR;
closestangle = FixedAngle(mthing->angle*FRACUNIT); closestangle = FixedAngle(mthing->angle*FRACUNIT);
@ -11217,33 +11218,42 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
closestangle = FixedAngle(mthing->angle*FRACUNIT); closestangle = FixedAngle(mthing->angle*FRACUNIT);
switch (mthing->type)
{
case 604:
case 605:
if (ultimatemode)
return; // No rings in Ultimate!
if (nightsreplace)
ringthing = MT_NIGHTSSTAR;
break;
case 608:
case 609:
/*ringthing = (i & 1) ? MT_RING : MT_BLUESPHERE; -- i == 0 is bluesphere
break;*/
case 606:
case 607:
ringthing = (nightsreplace) ? MT_NIGHTSCHIP : MT_BLUESPHERE;
break;
default:
break;
}
// Create the hoop! // Create the hoop!
for (i = 0; i < numitems; i++) for (i = 0; i < numitems; i++)
{ {
switch (mthing->type) if (mthing->type == 608 || mthing->type == 609)
{ {
case 604: if (i & 1)
case 605: {
ringthing = MT_BLUESPHERE; if (ultimatemode)
break; continue; // No rings in Ultimate!
case 608: ringthing = (nightsreplace) ? MT_NIGHTSSTAR : MT_RING;
case 609: }
ringthing = (i & 1) ? MT_RING : MT_BLUESPHERE; else
break; ringthing = (nightsreplace) ? MT_NIGHTSCHIP : MT_BLUESPHERE;
case 606:
case 607:
ringthing = MT_RING;
break;
default:
break;
} }
if (ringthing != MT_BLUESPHERE && ultimatemode)
continue; // No rings in Ultimate!
if ((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap))
ringthing = ((ringthing == MT_BLUESPHERE) ? MT_NIGHTSCHIP : MT_NIGHTSSTAR);
fa = i*FINEANGLES/numitems; fa = i*FINEANGLES/numitems;
v[0] = FixedMul(FINECOSINE(fa),size); v[0] = FixedMul(FINECOSINE(fa),size);
v[1] = 0; v[1] = 0;
@ -11282,7 +11292,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
// Which ringthing to use // Which ringthing to use
if (mthing->type == mobjinfo[MT_BLUESPHERE].doomednum) if (mthing->type == mobjinfo[MT_BLUESPHERE].doomednum)
ringthing = ((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap)) ? MT_NIGHTSCHIP : MT_BLUESPHERE; ringthing = (nightsreplace) ? MT_NIGHTSCHIP : MT_BLUESPHERE;
else if (mthing->type == mobjinfo[MT_BOMBSPHERE].doomednum) else if (mthing->type == mobjinfo[MT_BOMBSPHERE].doomednum)
ringthing = MT_BOMBSPHERE; ringthing = MT_BOMBSPHERE;
else else
@ -11290,7 +11300,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
if (ultimatemode) if (ultimatemode)
return; // No rings in Ultimate! return; // No rings in Ultimate!
if (mthing->type == mobjinfo[MT_COIN].doomednum) if (nightsreplace)
ringthing = MT_NIGHTSSTAR;
else if (mthing->type == mobjinfo[MT_COIN].doomednum)
ringthing = MT_COIN; ringthing = MT_COIN;
else if (mthing->type == mobjinfo[MT_REDTEAMRING].doomednum) // No team rings in non-CTF else if (mthing->type == mobjinfo[MT_REDTEAMRING].doomednum) // No team rings in non-CTF
ringthing = (gametype == GT_CTF) ? MT_REDTEAMRING : MT_RING; ringthing = (gametype == GT_CTF) ? MT_REDTEAMRING : MT_RING;