Merge branch 'nights-keeppoints' into 'master'

NiGHTS: Deduct marescore when player hits ground, not immediately on timeout

See merge request STJr/SRB2Internal!161
This commit is contained in:
Digiku 2018-09-19 11:03:24 -04:00
commit 87087c190e
2 changed files with 20 additions and 11 deletions

View file

@ -3313,12 +3313,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.
{

View file

@ -596,10 +596,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.
@ -611,6 +607,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 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.
@ -624,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;
}
@ -7077,8 +7082,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 = player->spheres =\
player->rings = 0;
}
player->powers[pw_carry] = CR_NONE;
}
}