mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'record-attack-changes' into v1.2-frankeinstein
This commit is contained in:
commit
4dfb47dff6
6 changed files with 32 additions and 11 deletions
|
|
@ -2691,11 +2691,17 @@ static void Command_Pause(void)
|
||||||
|
|
||||||
if (cv_pause.value || server || (IsPlayerAdmin(consoleplayer)))
|
if (cv_pause.value || server || (IsPlayerAdmin(consoleplayer)))
|
||||||
{
|
{
|
||||||
if (!paused && (modeattacking || !(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS)))
|
if (!paused && (!(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS)))
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("You can't pause here.\n"));
|
CONS_Printf(M_GetText("You can't pause here.\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (modeattacking) // in time attack, pausing restarts the map
|
||||||
|
{
|
||||||
|
M_ModeAttackRetry(0); // directly call from m_menu;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SendNetXCmd(XD_PAUSE, &buf, 2);
|
SendNetXCmd(XD_PAUSE, &buf, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
22
src/g_game.c
22
src/g_game.c
|
|
@ -2319,6 +2319,12 @@ void G_Ticker(boolean run)
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
INT32 buf;
|
INT32 buf;
|
||||||
ticcmd_t *cmd;
|
ticcmd_t *cmd;
|
||||||
|
UINT32 ra_timeskip = (modeattacking && !demo.playback && leveltime < starttime - TICRATE*4) ? 0 : (starttime - TICRATE*4 - 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.
|
||||||
|
|
||||||
P_MapStart();
|
P_MapStart();
|
||||||
// do player reborns if needed
|
// do player reborns if needed
|
||||||
|
|
@ -2391,12 +2397,16 @@ void G_Ticker(boolean run)
|
||||||
switch (gamestate)
|
switch (gamestate)
|
||||||
{
|
{
|
||||||
case GS_LEVEL:
|
case GS_LEVEL:
|
||||||
if (demo.title)
|
|
||||||
F_TitleDemoTicker();
|
for (; ra_timeskip < starttime - TICRATE*4; ra_timeskip++) // this looks weird but this is done to not break compability with older demos for now.
|
||||||
P_Ticker(run); // tic the game
|
{
|
||||||
ST_Ticker();
|
if (demo.title)
|
||||||
AM_Ticker();
|
F_TitleDemoTicker();
|
||||||
HU_Ticker();
|
P_Ticker(run); // tic the game
|
||||||
|
ST_Ticker();
|
||||||
|
AM_Ticker();
|
||||||
|
HU_Ticker();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_INTERMISSION:
|
case GS_INTERMISSION:
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,6 @@ static void M_HandleStaffReplay(INT32 choice);
|
||||||
static void M_ReplayTimeAttack(INT32 choice);
|
static void M_ReplayTimeAttack(INT32 choice);
|
||||||
static void M_ChooseTimeAttack(INT32 choice);
|
static void M_ChooseTimeAttack(INT32 choice);
|
||||||
//static void M_ChooseNightsAttack(INT32 choice);
|
//static void M_ChooseNightsAttack(INT32 choice);
|
||||||
static void M_ModeAttackRetry(INT32 choice);
|
|
||||||
static void M_ModeAttackEndGame(INT32 choice);
|
static void M_ModeAttackEndGame(INT32 choice);
|
||||||
static void M_SetGuestReplay(INT32 choice);
|
static void M_SetGuestReplay(INT32 choice);
|
||||||
//static void M_ChoosePlayer(INT32 choice);
|
//static void M_ChoosePlayer(INT32 choice);
|
||||||
|
|
@ -8259,7 +8258,7 @@ static void M_SetGuestReplay(INT32 choice)
|
||||||
which(0);
|
which(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_ModeAttackRetry(INT32 choice)
|
void M_ModeAttackRetry(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)choice;
|
(void)choice;
|
||||||
G_CheckDemoStatus(); // Cancel recording
|
G_CheckDemoStatus(); // Cancel recording
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,9 @@ void M_SortServerList(void);
|
||||||
// Draws a box with a texture inside as background for messages
|
// Draws a box with a texture inside as background for messages
|
||||||
void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines);
|
void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines);
|
||||||
|
|
||||||
|
// Used in d_netcmd to restart time attack
|
||||||
|
void M_ModeAttackRetry(INT32 choice);
|
||||||
|
|
||||||
// the function to show a message box typing with the string inside
|
// the function to show a message box typing with the string inside
|
||||||
// string must be static (not in the stack)
|
// string must be static (not in the stack)
|
||||||
// routine is a function taking a INT32 in parameter
|
// routine is a function taking a INT32 in parameter
|
||||||
|
|
|
||||||
|
|
@ -691,7 +691,10 @@ void P_Ticker(boolean run)
|
||||||
|
|
||||||
if (run)
|
if (run)
|
||||||
leveltime++;
|
leveltime++;
|
||||||
timeinmap++;
|
|
||||||
|
// as this is mostly used for HUD stuff, add the record attack specific hack to it as well!
|
||||||
|
if (!(modeattacking && !demo.playback) || leveltime >= starttime - TICRATE*4)
|
||||||
|
timeinmap++;
|
||||||
|
|
||||||
/*if (G_TagGametype())
|
/*if (G_TagGametype())
|
||||||
P_DoTagStuff();
|
P_DoTagStuff();
|
||||||
|
|
|
||||||
|
|
@ -7657,7 +7657,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
const INT32 timeovercam = max(0, min(180, (player->kartstuff[k_timeovercam] - 2*TICRATE)*15));
|
const INT32 timeovercam = max(0, min(180, (player->kartstuff[k_timeovercam] - 2*TICRATE)*15));
|
||||||
camrotate += timeovercam;
|
camrotate += timeovercam;
|
||||||
}
|
}
|
||||||
else if (leveltime < introtime) // Whoooshy camera!
|
else if (leveltime < introtime && !(modeattacking && !demo.playback)) // Whoooshy camera! (don't do this in RA when we PLAY, still do it in replays however~)
|
||||||
{
|
{
|
||||||
const INT32 introcam = (introtime - leveltime);
|
const INT32 introcam = (introtime - leveltime);
|
||||||
camrotate += introcam*5;
|
camrotate += introcam*5;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue