Fix the case where GP coop would cause no Capsules + possibly DUELs in eventmode
Also reduces some of the dead time before Break The Capsules begins by cutting out the majority of POSITION!! and hiding the one measly bulb that would otherwise appear
This commit is contained in:
parent
2939f63418
commit
caf91c30dd
3 changed files with 21 additions and 27 deletions
|
|
@ -487,22 +487,13 @@ void K_SpawnPlayerBattleBumpers(player_t *p)
|
|||
}
|
||||
}
|
||||
|
||||
void K_BattleInit(UINT8 numPlayers)
|
||||
void K_BattleInit(boolean singleplayercontext)
|
||||
{
|
||||
if ((gametyperules & GTR_ITEMBREAKER) && !itembreaker && !bossinfo.boss)
|
||||
if ((gametyperules & GTR_ITEMBREAKER) && singleplayercontext && !itembreaker && !bossinfo.boss)
|
||||
{
|
||||
if (modeattacking != ATTACKING_ITEMBREAK)
|
||||
{
|
||||
if (K_CanChangeRules() && !cv_kartitembreaker.value)
|
||||
goto afteritembreaker;
|
||||
|
||||
if (numPlayers > 1)
|
||||
goto afteritembreaker;
|
||||
}
|
||||
|
||||
itembreaker = true;
|
||||
if (!(K_CanChangeRules() && !cv_kartitembreaker.value))
|
||||
itembreaker = true;
|
||||
}
|
||||
afteritembreaker:
|
||||
|
||||
if (gametyperules & GTR_BUMPERS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ void K_CheckBumpers(void);
|
|||
UINT8 K_NumEmeralds(player_t *player);
|
||||
void K_RunPaperItemSpawners(void);
|
||||
void K_SpawnPlayerBattleBumpers(player_t *p);
|
||||
void K_BattleInit(UINT8 numPlayers);
|
||||
void K_BattleInit(boolean singleplayercontext);
|
||||
void K_RespawnBattleBoxes(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
29
src/k_kart.c
29
src/k_kart.c
|
|
@ -101,7 +101,9 @@ vector3_t clusterpoint, clusterdtf;
|
|||
void K_TimerInit(void)
|
||||
{
|
||||
UINT8 i;
|
||||
UINT8 numPlayers = 0;//, numspec = 0;
|
||||
UINT8 numPlayers = 0;
|
||||
boolean singleplayercontext = ((modeattacking != ATTACKING_NONE)
|
||||
|| (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE));
|
||||
|
||||
starttime = introtime = 0;
|
||||
|
||||
|
|
@ -111,20 +113,22 @@ void K_TimerInit(void)
|
|||
}
|
||||
else if (bossinfo.boss == false)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (!singleplayercontext)
|
||||
{
|
||||
if (!playeringame[i])
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
continue;
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
numPlayers++;
|
||||
}
|
||||
|
||||
if (players[i].spectator == true)
|
||||
if (numPlayers < 2)
|
||||
{
|
||||
//numspec++;
|
||||
continue;
|
||||
singleplayercontext = true;
|
||||
}
|
||||
|
||||
numPlayers++;
|
||||
}
|
||||
|
||||
introtime = (108) + 5; // 108 for rotation, + 5 for white fade
|
||||
|
|
@ -136,13 +140,10 @@ void K_TimerInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
// NOW you can try to setup Item Breaker, if there's not enough players for a match
|
||||
K_BattleInit(numPlayers);
|
||||
|
||||
timelimitintics = extratimeintics = secretextratime = 0;
|
||||
if ((gametyperules & GTR_TIMELIMIT) && !bossinfo.boss)
|
||||
{
|
||||
if (!K_CanChangeRules())
|
||||
if (singleplayercontext)
|
||||
{
|
||||
if (grandprixinfo.gp)
|
||||
{
|
||||
|
|
@ -161,6 +162,8 @@ void K_TimerInit(void)
|
|||
timelimitintics = cv_timelimit.value * (60*TICRATE);
|
||||
}
|
||||
}
|
||||
|
||||
K_BattleInit(singleplayercontext);
|
||||
}
|
||||
|
||||
UINT32 K_GetPlayerDontDrawFlag(player_t *player)
|
||||
|
|
|
|||
Loading…
Reference in a new issue