Deduct marescore when player hits ground

* ~~For speedrunning~~: Land on the Drone, keep your points!
This commit is contained in:
mazmazz 2018-08-13 11:12:53 -04:00
parent effd0ebe97
commit 2a2569155a
2 changed files with 16 additions and 11 deletions

View file

@ -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) else if (player->powers[pw_carry] == CR_NIGHTSFALL)
{ {
if (player->spheres > 0) // always damage so we can recoil upon losing points
{ damage = player->spheres;
damage = player->spheres; P_RingDamage(player, inflictor, source, damage, damagetype, true);
P_RingDamage(player, inflictor, source, damage, damagetype, true); damage = 0;
damage = 0;
}
} }
else if (player->rings > 0) // No shield but have rings. else if (player->rings > 0) // No shield but have rings.
{ {

View file

@ -590,10 +590,6 @@ static void P_DeNightserizePlayer(player_t *player)
else if (player == &players[secondarydisplayplayer]) else if (player == &players[secondarydisplayplayer])
localaiming2 = 0; 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); P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
// If in a special stage, add some preliminary exit time. // 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. players[i].nightstime = 1; // force everyone else to fall too.
player->exiting = 3*TICRATE; player->exiting = 3*TICRATE;
stagefailed = true; // NIGHT OVER 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. // Check to see if the player should be killed.
@ -7030,8 +7031,14 @@ static void P_MovePlayer(player_t *player)
if (playeringame[i]) if (playeringame[i])
players[i].exiting = (14*TICRATE)/5 + 1; 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); 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; player->powers[pw_carry] = CR_NONE;
} }
} }