From f1fc205b31248e40179b61b27ac8e634583fd247 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 13 Aug 2018 11:12:53 -0400 Subject: [PATCH 1/2] Deduct marescore when player hits ground * ~~For speedrunning~~: Land on the Drone, keep your points! --- src/p_inter.c | 10 ++++------ src/p_user.c | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index ce8bba6b6..120f17569 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -3311,12 +3311,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da } else if (player->powers[pw_carry] == CR_NIGHTSFALL) { - if (player->spheres > 0) - { - damage = player->spheres; - P_RingDamage(player, inflictor, source, damage, damagetype, true); - damage = 0; - } + // always damage so we can recoil upon losing points + damage = player->spheres; + P_RingDamage(player, inflictor, source, damage, damagetype, true); + damage = 0; } else if (player->rings > 0) // No shield but have rings. { diff --git a/src/p_user.c b/src/p_user.c index fd09b0847..140c60acd 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -590,10 +590,6 @@ static void P_DeNightserizePlayer(player_t *player) else if (player == &players[secondarydisplayplayer]) localaiming2 = 0; - // If you screwed up, kiss your score and ring bonus goodbye. - player->marescore = 0; - player->rings = 0; - P_SetPlayerMobjState(player->mo, S_PLAY_FALL); // If in a special stage, add some preliminary exit time. @@ -605,6 +601,11 @@ static void P_DeNightserizePlayer(player_t *player) players[i].nightstime = 1; // force everyone else to fall too. player->exiting = 3*TICRATE; stagefailed = true; // NIGHT OVER + + // If you screwed up, kiss your score and ring bonus goodbye. + // But don't do this yet if not in special stage! Wait til we hit the ground. + player->marescore = 0; + player->rings = 0; } // Check to see if the player should be killed. @@ -7030,8 +7031,14 @@ static void P_MovePlayer(player_t *player) if (playeringame[i]) players[i].exiting = (14*TICRATE)/5 + 1; } - else if (player->spheres > 0) + else { + // Damage whether or not we have spheres, as player should recoil upon losing points P_DamageMobj(player->mo, NULL, NULL, 1, 0); + + // Now deduct our mare score! + player->marescore = 0; + player->rings = 0; + } player->powers[pw_carry] = CR_NONE; } } From 49b27fc1243e1d663032c80f9f0adfd726d8fbd5 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Fri, 7 Sep 2018 08:19:22 -0400 Subject: [PATCH 2/2] Deduct marescore immediately on instakill * Deduct player->spheres too, missed that one --- src/p_user.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index e1480a47d..806fc5da0 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -609,9 +609,9 @@ static void P_DeNightserizePlayer(player_t *player) stagefailed = true; // NIGHT OVER // If you screwed up, kiss your score and ring bonus goodbye. - // But don't do this yet if not in special stage! Wait til we hit the ground. - player->marescore = 0; - player->rings = 0; + // But only do this in special stage (and instakill!) In regular stages, wait til we hit the ground. + player->marescore = player->spheres =\ + player->rings = 0; } // Check to see if the player should be killed. @@ -625,7 +625,11 @@ static void P_DeNightserizePlayer(player_t *player) continue; if (mo2->flags2 & MF2_AMBUSH) + { + player->marescore = player->spheres =\ + player->rings = 0; P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL); + } break; } @@ -7083,8 +7087,8 @@ static void P_MovePlayer(player_t *player) P_DamageMobj(player->mo, NULL, NULL, 1, 0); // Now deduct our mare score! - player->marescore = 0; - player->rings = 0; + player->marescore = player->spheres =\ + player->rings = 0; } player->powers[pw_carry] = CR_NONE; }