Added NIGHTSLINK bonus type for the 2.1 Link Bonus

This commit is contained in:
mazmazz 2018-09-09 01:13:02 -04:00
parent d53582596f
commit eb590910b2
2 changed files with 9 additions and 4 deletions

View File

@ -1197,8 +1197,9 @@ static void readlevelheader(MYFILE *f, INT32 num)
else if (fastcmp(word2, "BOSS")) i = 1;
else if (fastcmp(word2, "ERZ3")) i = 2;
else if (fastcmp(word2, "NIGHTS")) i = 3;
else if (fastcmp(word2, "NIGHTSLINK")) i = 4;
if (i >= -1 && i <= 3) // -1 for no bonus. Max is 3.
if (i >= -1 && i <= 4) // -1 for no bonus. Max is 3.
mapheaderinfo[num-1]->bonustype = (SINT8)i;
else
deh_warning("Level header %d: invalid bonus type number %d", num, i);

View File

@ -1774,7 +1774,6 @@ static void Y_SetLapBonus(player_t *player, y_bonus_t *bstruct)
bstruct->points = max(0, player->totalmarebonuslap * 1000);
}
#if 0
//
// Y_SetLinkBonus
//
@ -1784,7 +1783,6 @@ static void Y_SetLinkBonus(player_t *player, y_bonus_t *bstruct)
bstruct->display = true;
bstruct->points = max(0, (player->maxlink - 1) * 100);
}
#endif
//
// Y_SetGuardBonus
@ -1837,7 +1835,7 @@ static void Y_SetPerfectBonus(player_t *player, y_bonus_t *bstruct)
// This list can be extended in the future with SOC/Lua, perhaps.
typedef void (*bonus_f)(player_t *, y_bonus_t *);
bonus_f bonuses_list[5][4] = {
bonus_f bonuses_list[6][4] = {
{
Y_SetNullBonus,
Y_SetNullBonus,
@ -1868,6 +1866,12 @@ bonus_f bonuses_list[5][4] = {
Y_SetLapBonus,
Y_SetNullBonus,
},
{
Y_SetNullBonus,
Y_SetLinkBonus,
Y_SetLapBonus,
Y_SetNullBonus,
},
};