Fix bosses not having the correct number of bumpers set.

This commit is contained in:
toaster 2022-03-05 23:25:32 +00:00
parent bf43784d22
commit 6f33cd7ce6

View file

@ -57,51 +57,50 @@ void K_TimerInit(void)
UINT8 i; UINT8 i;
UINT8 numPlayers = 0;//, numspec = 0; UINT8 numPlayers = 0;//, numspec = 0;
// Bosses handle it elsewhere! if (!bossinfo.boss)
if (bossinfo.boss == true)
return;
for (i = 0; i < MAXPLAYERS; i++)
{ {
if (!playeringame[i]) for (i = 0; i < MAXPLAYERS; i++)
{ {
continue; if (!playeringame[i])
{
continue;
}
if (players[i].spectator == true)
{
//numspec++;
continue;
}
numPlayers++;
} }
if (players[i].spectator == true) if (numPlayers >= 2)
{ {
//numspec++; rainbowstartavailable = true;
continue; }
else
{
rainbowstartavailable = false;
} }
numPlayers++; // No intro in Record Attack / 1v1
} // Leave unset for the value in K_TimerReset
if (numPlayers > 2)
{
introtime = (108) + 5; // 108 for rotation, + 5 for white fade
}
if (numPlayers >= 2) numbulbs = 5;
{
rainbowstartavailable = true;
}
else
{
rainbowstartavailable = false;
}
// No intro in Record Attack / 1v1 if (numPlayers > 2)
// Leave unset for the value in K_TimerReset {
if (numPlayers > 2) numbulbs += (numPlayers-2);
{ }
introtime = (108) + 5; // 108 for rotation, + 5 for white fade
starttime = (introtime + (3*TICRATE)) + ((2*TICRATE) + (numbulbs * bulbtime)); // Start countdown time, + buffer time
} }
numbulbs = 5;
if (numPlayers > 2)
{
numbulbs += (numPlayers-2);
}
starttime = (introtime + (3*TICRATE)) + ((2*TICRATE) + (numbulbs * bulbtime)); // Start countdown time, + buffer time
// NOW you can try to spawn in the Battle capsules, if there's not enough players for a match // NOW you can try to spawn in the Battle capsules, if there's not enough players for a match
K_BattleInit(); K_BattleInit();
//CONS_Printf("numbulbs set to %d (%d players, %d spectators) on tic %d\n", numbulbs, numPlayers, numspec, leveltime); //CONS_Printf("numbulbs set to %d (%d players, %d spectators) on tic %d\n", numbulbs, numPlayers, numspec, leveltime);