Buffer time before countdown depends on player count, no intro spin in 1v1

This commit is contained in:
Sally Coolatta 2020-07-27 23:31:46 -04:00
parent dfe4d4a219
commit b08459cbee
3 changed files with 25 additions and 16 deletions

View file

@ -224,8 +224,8 @@ UINT16 spacetimetics = 11*TICRATE + (TICRATE/2);
UINT16 extralifetics = 4*TICRATE;
// SRB2kart
tic_t introtime = (108) + 5; // 108 for rotation, + 5 for white fade
tic_t starttime = (6*TICRATE) + (2*TICRATE); // Start countdown time, + buffer time
tic_t introtime = 0;
tic_t starttime = 0;
tic_t raceexittime = 5*TICRATE + (2*TICRATE/3);
tic_t battleexittime = 8*TICRATE;
INT32 hyudorotime = 7*TICRATE;
@ -2333,10 +2333,6 @@ void G_Ticker(boolean run)
UINT32 i;
INT32 buf;
ticcmd_t *cmd;
UINT32 ra_timeskip = (modeattacking && !demo.playback && leveltime < introtime) ? 0 : (introtime - 1);
// starttime - TICRATE*4 is where we want RA to start when we PLAY IT, so we will loop the main thinker on RA start to get it to this point,
// the reason this is done is to ensure that ghosts won't look out of synch with other map elements (objects, moving platforms...)
// when we REPLAY, don't skip, let the camera spin, do its thing etc~
// also the -1 is to ensure that the thinker runs in the loop below.
@ -2409,16 +2405,12 @@ void G_Ticker(boolean run)
switch (gamestate)
{
case GS_LEVEL:
for (; ra_timeskip < introtime; ra_timeskip++) // this looks weird but this is done to not break compability with older demos for now.
{
if (demo.title)
F_TitleDemoTicker();
P_Ticker(run); // tic the game
ST_Ticker();
AM_Ticker();
HU_Ticker();
}
if (demo.title)
F_TitleDemoTicker();
P_Ticker(run); // tic the game
ST_Ticker();
AM_Ticker();
HU_Ticker();
break;
case GS_INTERMISSION:

View file

@ -3474,6 +3474,9 @@ static void P_NetArchiveMisc(void)
WRITESINT8(save_p, spbplace);
WRITEUINT8(save_p, rainbowstartavailable);
WRITEUINT32(save_p, introtime);
WRITEUINT32(save_p, starttime);
// Is it paused?
if (paused)
WRITEUINT8(save_p, 0x2f);
@ -3600,6 +3603,9 @@ static inline boolean P_NetUnArchiveMisc(void)
spbplace = READSINT8(save_p);
rainbowstartavailable = (boolean)READUINT8(save_p);
introtime = READUINT32(save_p);
starttime = READUINT32(save_p);
// Is it paused?
if (READUINT8(save_p) == 0x2f)
paused = true;

View file

@ -2472,6 +2472,17 @@ static void P_LevelInitStuff(void)
if (p >= 2)
rainbowstartavailable = true;
if (p <= 2)
{
introtime = 0; // No intro in Record Attack / 1v1
}
else
{
introtime = (108) + 5; // 108 for rotation, + 5 for white fade
}
starttime = introtime + (6*TICRATE) + (max(p-2, 0) * (TICRATE/2)); // Start countdown time, + buffer time
// SRB2Kart: map load variables
if (grandprixinfo.gp == true)
{