Add emeraldspawndelay for Match "super"

Emeralds will not spawn while players are still
enjoying their victory dance now.
This commit is contained in:
Yukita Mayako 2015-05-27 04:01:58 -04:00
parent c6c4ab7c53
commit 1c1acb9f0e
5 changed files with 9 additions and 7 deletions

View file

@ -86,6 +86,7 @@ UINT8 modeattacking = ATTACKING_NONE;
boolean disableSpeedAdjust = false;
boolean imcontinuing = false;
boolean runemeraldmanager = false;
UINT16 emeraldspawndelay = 60*TICRATE;
// menu demo things
UINT8 numDemos = 3;

View file

@ -241,9 +241,10 @@ void P_DoMatchSuper(player_t *player)
return;
// Got 'em all? Turn "super"!
emeraldspawndelay = invulntics + 1;
player->powers[pw_emeralds] = 0;
player->powers[pw_invulnerability] = invulntics + 1;
player->powers[pw_sneakers] = player->powers[pw_invulnerability];
player->powers[pw_invulnerability] = emeraldspawndelay;
player->powers[pw_sneakers] = emeraldspawndelay;
if (P_IsLocalPlayer(player) && !player->powers[pw_super])
{
S_StopMusic();

View file

@ -657,14 +657,12 @@ void P_EmeraldManager(void)
else
break;
if (leveltime < TICRATE) // Start of map
spawnpoints[j]->threshold = 60*TICRATE + P_Random() * (TICRATE/5);
else
spawnpoints[j]->threshold = P_Random() * (TICRATE/5);
spawnpoints[j]->threshold = emeraldspawndelay + P_Random() * (TICRATE/5);
break;
}
}
emeraldspawndelay = 0;
}
//

View file

@ -444,5 +444,6 @@ void P_EmeraldManager(void);
extern mapthing_t *huntemeralds[MAXHUNTEMERALDS];
extern INT32 numhuntemeralds;
extern boolean runemeraldmanager;
extern UINT16 emeraldspawndelay;
extern INT32 numstarposts;
#endif

View file

@ -2015,6 +2015,7 @@ static void P_LevelInitStuff(void)
// special stage tokens, emeralds, and ring total
tokenbits = 0;
runemeraldmanager = false;
emeraldspawndelay = 60*TICRATE;
nummaprings = 0;
// emerald hunt