Tie emblem spawning to Coop gametypes

This commit is contained in:
Sally Coolatta 2022-02-28 17:36:02 -05:00
parent ffb76334ff
commit ffe591afee
2 changed files with 9 additions and 1 deletions

View file

@ -3843,16 +3843,19 @@ static void G_UpdateVisited(gamedata_t *data, boolean silent)
{ {
boolean spec = G_IsSpecialStage(gamemap); boolean spec = G_IsSpecialStage(gamemap);
// Update visitation flags? // Update visitation flags?
if (!demoplayback && (gametype == GT_COOP) // SP/RA/NiGHTS mode if (!demoplayback
&& G_CoopGametype() // Campaign mode
&& !stagefailed) // Did not fail the stage && !stagefailed) // Did not fail the stage
{ {
UINT8 earnedEmblems; UINT8 earnedEmblems;
// Update visitation flags // Update visitation flags
data->mapvisited[gamemap-1] |= MV_BEATEN; data->mapvisited[gamemap-1] |= MV_BEATEN;
// eh, what the hell // eh, what the hell
if (ultimatemode) if (ultimatemode)
data->mapvisited[gamemap-1] |= MV_ULTIMATE; data->mapvisited[gamemap-1] |= MV_ULTIMATE;
// may seem incorrect but IS possible in what the main game uses as mp special stages, and nummaprings will be -1 in NiGHTS // may seem incorrect but IS possible in what the main game uses as mp special stages, and nummaprings will be -1 in NiGHTS
if (nummaprings > 0 && players[consoleplayer].rings >= nummaprings) if (nummaprings > 0 && players[consoleplayer].rings >= nummaprings)
{ {
@ -3860,6 +3863,7 @@ static void G_UpdateVisited(gamedata_t *data, boolean silent)
if (modeattacking) if (modeattacking)
data->mapvisited[gamemap-1] |= MV_PERFECTRA; data->mapvisited[gamemap-1] |= MV_PERFECTRA;
} }
if (!spec) if (!spec)
{ {
// not available to special stages because they can only really be done in one order in an unmodified game, so impossible for first six and trivial for seventh // not available to special stages because they can only really be done in one order in an unmodified game, so impossible for first six and trivial for seventh

View file

@ -12009,6 +12009,10 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
return false; // You already got this token return false; // You already got this token
break; break;
case MT_EMBLEM:
if (!G_CoopGametype())
return false; // Gametype's not right
break;
default: default:
break; break;
} }