Some token efforts to make singleplayer mode (accessible only via -warp and map mapxx -force) not COMPLETELY broken.

* Fixed the conditionals for `suicide` and `retry` commands - `suicide` is now allowed in singleplayer, and `retry` no longer checks your lives (for now).
* Disable the "traditional" level reload method (which `retry` tried to use), since it was completely broken with the other changes we've made. Mapchanges only.
* Made retries cause a mapchange, per the above.
* Disable the last source of skincolor trampling in the game - loading a level while not netgame or record attacking.
This commit is contained in:
toaster 2018-10-17 13:40:17 +01:00
parent 1f1ba26aa7
commit ce443712b2
5 changed files with 19 additions and 16 deletions

View file

@ -2388,11 +2388,12 @@ static void Command_Suicide(void)
}*/ }*/
// Retry is quicker. Probably should force people to use it. // Retry is quicker. Probably should force people to use it.
if (!(netgame || multiplayer)) // nope, this is srb2kart - a complete retry is overkill
/*if (!(netgame || multiplayer))
{ {
CONS_Printf(M_GetText("You can't use this in Single Player! Use \"retry\" instead.\n")); CONS_Printf(M_GetText("You can't use this in Single Player! Use \"retry\" instead.\n"));
return; return;
} }*/
SendNetXCmd(XD_SUICIDE, &buf, 4); SendNetXCmd(XD_SUICIDE, &buf, 4);
} }
@ -4792,10 +4793,10 @@ void Command_Retry_f(void)
CONS_Printf(M_GetText("You must be in a level to use this.\n")); CONS_Printf(M_GetText("You must be in a level to use this.\n"));
else if (netgame || multiplayer) else if (netgame || multiplayer)
CONS_Printf(M_GetText("This only works in single player.\n")); CONS_Printf(M_GetText("This only works in single player.\n"));
else if (!&players[consoleplayer] || players[consoleplayer].lives <= 1) /*else if (!&players[consoleplayer] || players[consoleplayer].lives <= 1)
CONS_Printf(M_GetText("You can't retry without any lives remaining!\n")); CONS_Printf(M_GetText("You can't retry without any lives remaining!\n"));
else if (G_IsSpecialStage(gamemap)) else if (G_IsSpecialStage(gamemap))
CONS_Printf(M_GetText("You can't retry special stages!\n")); CONS_Printf(M_GetText("You can't retry special stages!\n"));*/
else else
{ {
M_ClearMenus(true); M_ClearMenus(true);

View file

@ -2100,10 +2100,12 @@ void G_Ticker(boolean run)
G_ClearRetryFlag(); G_ClearRetryFlag();
// Costs a life to retry ... unless the player in question is dead already. // Costs a life to retry ... unless the player in question is dead already.
if (G_GametypeUsesLives() && players[consoleplayer].playerstate == PST_LIVE) /*if (G_GametypeUsesLives() && players[consoleplayer].playerstate == PST_LIVE)
players[consoleplayer].lives -= 1; players[consoleplayer].lives -= 1;
G_DoReborn(consoleplayer); G_DoReborn(consoleplayer);*/
D_MapChange(gamemap, gametype, cv_kartencore.value, true, 1, false, false);
} }
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
@ -2935,7 +2937,7 @@ void G_DoReborn(INT32 playernum)
if (oldmo) if (oldmo)
G_ChangePlayerReferences(oldmo, players[playernum].mo); G_ChangePlayerReferences(oldmo, players[playernum].mo);
} }
else if (countdowntimeup || (!multiplayer && gametype == GT_COOP)) /*else if (countdowntimeup || (!multiplayer && !modeattacking))
{ {
// reload the level from scratch // reload the level from scratch
if (countdowntimeup) if (countdowntimeup)
@ -3004,7 +3006,7 @@ void G_DoReborn(INT32 playernum)
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
} }
#endif #endif
} }*/
else else
{ {
// respawn at the start // respawn at the start

View file

@ -2865,18 +2865,18 @@ void M_StartControlPanel(void)
} }
else if (!(netgame || multiplayer)) // Single Player else if (!(netgame || multiplayer)) // Single Player
{ {
if (gamestate != GS_LEVEL || ultimatemode) // intermission, so gray out stuff. if (gamestate != GS_LEVEL /*|| ultimatemode*/) // intermission, so gray out stuff.
{ {
SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA)) ? (IT_GRAYEDOUT) : (IT_DISABLED); SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA)) ? (IT_GRAYEDOUT) : (IT_DISABLED);
SPauseMenu[spause_retry].status = IT_GRAYEDOUT; SPauseMenu[spause_retry].status = IT_GRAYEDOUT;
} }
else else
{ {
INT32 numlives = 2; //INT32 numlives = 2;
SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA)) ? (IT_STRING | IT_CALL) : (IT_DISABLED); SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA)) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
if (&players[consoleplayer]) /*if (&players[consoleplayer])
{ {
numlives = players[consoleplayer].lives; numlives = players[consoleplayer].lives;
if (players[consoleplayer].playerstate != PST_LIVE) if (players[consoleplayer].playerstate != PST_LIVE)
@ -2887,7 +2887,7 @@ void M_StartControlPanel(void)
// for me to want to use the short if statement syntax // for me to want to use the short if statement syntax
if (numlives <= 1 || G_IsSpecialStage(gamemap)) if (numlives <= 1 || G_IsSpecialStage(gamemap))
SPauseMenu[spause_retry].status = (IT_GRAYEDOUT); SPauseMenu[spause_retry].status = (IT_GRAYEDOUT);
else else*/
SPauseMenu[spause_retry].status = (IT_STRING | IT_CALL); SPauseMenu[spause_retry].status = (IT_STRING | IT_CALL);
} }
@ -4962,7 +4962,7 @@ static void M_RetryResponse(INT32 ch)
static void M_Retry(INT32 choice) static void M_Retry(INT32 choice)
{ {
(void)choice; (void)choice;
M_StartMessage(M_GetText("Retry this act from the last starpost?\n\n(Press 'Y' to confirm)\n"),M_RetryResponse,MM_YESNO); M_StartMessage(M_GetText("Start this race over?\n\n(Press 'Y' to confirm)\n"),M_RetryResponse,MM_YESNO);
} }
static void M_SelectableClearMenus(INT32 choice) static void M_SelectableClearMenus(INT32 choice)

View file

@ -2209,7 +2209,7 @@ static void P_LevelInitStuff(void)
players[i].lives = cv_startinglives.value; players[i].lives = cv_startinglives.value;
} }
#else #else
players[i].lives = 1; players[i].lives = 1; // SRB2Kart
#endif #endif
players[i].realtime = countdown = countdown2 = 0; players[i].realtime = countdown = countdown2 = 0;

View file

@ -2699,7 +2699,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
player->jumpfactor = skin->jumpfactor; player->jumpfactor = skin->jumpfactor;
if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback || modeattacking)) /*if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback || modeattacking))
{ {
if (playernum == consoleplayer) if (playernum == consoleplayer)
CV_StealthSetValue(&cv_playercolor, skin->prefcolor); CV_StealthSetValue(&cv_playercolor, skin->prefcolor);
@ -2712,7 +2712,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
player->skincolor = skin->prefcolor; player->skincolor = skin->prefcolor;
if (player->mo) if (player->mo)
player->mo->color = player->skincolor; player->mo->color = player->skincolor;
} }*/
if (player->mo) if (player->mo)
P_SetScale(player->mo, player->mo->scale); P_SetScale(player->mo, player->mo->scale);