From f1387a07a1813ac65e26b6414061d0d4c8215458 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 12:30:32 +0000 Subject: [PATCH 1/3] Instead of making conditions which check for death individually check for special stages to prevent lives loss, just set G_GametypeUsesLives to false in a special stage. --- src/g_game.c | 2 +- src/p_inter.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 6988a011a..2fa52e7c0 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3099,7 +3099,7 @@ boolean G_GametypeUsesLives(void) // Coop, Competitive if ((gametype == GT_COOP || gametype == GT_COMPETITION) && !(modeattacking || metalrecording) // No lives in Time Attack - //&& !G_IsSpecialStage(gamemap) + && !G_IsSpecialStage(gamemap) && !(maptol & TOL_NIGHTS)) // No lives in NiGHTS return true; return false; diff --git a/src/p_inter.c b/src/p_inter.c index d1ea02c80..325070b35 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2521,7 +2521,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget if ((target->player->lives <= 1) && (netgame || multiplayer) && (gametype == GT_COOP) && (cv_cooplives.value == 0)) ; - else if (!target->player->bot && !target->player->spectator && !G_IsSpecialStage(gamemap) && (target->player->lives != INFLIVES) + else if (!target->player->bot && !target->player->spectator && (target->player->lives != INFLIVES) && G_GametypeUsesLives()) { target->player->lives -= 1; // Lose a life Tails 03-11-2000 From b71cf97cac424eff568426f1dccfe1caeb6e27fe Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 12:33:56 +0000 Subject: [PATCH 2/3] * Prevent that GOD AWFUL random camera turn that happens sometimes during the fade after you die (when you input camera turn stuff after death) by locking the camera during PST_REBORN. * Remove whitespace in P_DeathThink. --- src/p_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 7a80031b8..2be24fbfd 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -9499,7 +9499,6 @@ static void P_DeathThink(player_t *player) } else if ((netgame || multiplayer) && player->deadtimer >= 8*TICRATE) { - INT32 i, deadtimercheck = INT32_MAX; // In a net/multiplayer game, and out of lives @@ -9664,7 +9663,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall fixed_t f1, f2; // We probably shouldn't move the camera if there is no player or player mobj somehow - if (!player || !player->mo) + if (!player || !player->mo || player->playerstate == PST_REBORN) return true; mo = player->mo; From f50feb16393e68f7e619374dcc0a66b3fae5ab6e Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 12:37:57 +0000 Subject: [PATCH 3/3] Change the default value of cv_coopstarposts (as per #321), and make it NOT a cheat to change since the other options are in effect more restrictive. (Leaving cv_cooplives at its current value for now, though.) --- src/d_netcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index f9ec6c351..8fa4b2e0b 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -355,7 +355,7 @@ static CV_PossibleValue_t inttime_cons_t[] = {{0, "MIN"}, {3600, "MAX"}, {0, NUL consvar_t cv_inttime = {"inttime", "10", CV_NETVAR, inttime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static CV_PossibleValue_t coopstarposts_cons_t[] = {{0, "Per-player"}, {1, "Shared"}, {2, "Teamwork"}, {0, NULL}}; -consvar_t cv_coopstarposts = {"coopstarposts", "Teamwork", CV_NETVAR|CV_CALL|CV_CHEAT, coopstarposts_cons_t, CoopStarposts_OnChange, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_coopstarposts = {"coopstarposts", "Per-player", CV_NETVAR|CV_CALL, coopstarposts_cons_t, CoopStarposts_OnChange, 0, NULL, NULL, 0, 0, NULL}; static CV_PossibleValue_t cooplives_cons_t[] = {{0, "Infinite"}, {1, "Per-player"}, {2, "Avoid Game Over"}, {3, "Single pool"}, {0, NULL}}; consvar_t cv_cooplives = {"cooplives", "Avoid Game Over", CV_NETVAR|CV_CALL|CV_CHEAT, cooplives_cons_t, CoopLives_OnChange, 0, NULL, NULL, 0, 0, NULL};