Skip to content
Snippets Groups Projects
Commit e7e9bb54 authored by Ace Lite's avatar Ace Lite
Browse files

Fixing wrong if conditions

parent 3f1e6a63
No related branches found
No related tags found
No related merge requests found
...@@ -2090,12 +2090,12 @@ static void Y_AwardCoopBonuses(int awarddenial) ...@@ -2090,12 +2090,12 @@ static void Y_AwardCoopBonuses(int awarddenial)
for (j = 0; j < 4; ++j) // Set bonuses for (j = 0; j < 4; ++j) // Set bonuses
{ {
//Set the bonus, but only if we actually finished //Set the bonus, but only if we actually finished
if (players[i].pflags & PF_FINISHED && awarddenial == 2) if (players[i].pflags & PF_FINISHED && awarddenial != 2)
(bonuses_list[bonusnum][j])(&players[i], &localbonuses[j]); (bonuses_list[bonusnum][j])(&players[i], &localbonuses[j]);
else else
Y_SetNullBonus(&players[i], &localbonuses[j]); Y_SetNullBonus(&players[i], &localbonuses[j]);
if (awarddenial == 2) if (awarddenial != 2)
{ {
players[i].score += localbonuses[j].points; players[i].score += localbonuses[j].points;
if (players[i].score > MAXSCORE) if (players[i].score > MAXSCORE)
...@@ -2109,7 +2109,7 @@ static void Y_AwardCoopBonuses(int awarddenial) ...@@ -2109,7 +2109,7 @@ static void Y_AwardCoopBonuses(int awarddenial)
ptlives = min( ptlives = min(
(INT32)((!ultimatemode && !modeattacking && players[i].lives != INFLIVES) ? max((INT32)((players[i].score / 50000) - (oldscore / 50000)), (INT32)0) : 0), (INT32)((!ultimatemode && !modeattacking && players[i].lives != INFLIVES) ? max((INT32)((players[i].score / 50000) - (oldscore / 50000)), (INT32)0) : 0),
(INT32)(mapheaderinfo[prevmap]->maxbonuslives < 0 ? INT32_MAX : mapheaderinfo[prevmap]->maxbonuslives)); (INT32)(mapheaderinfo[prevmap]->maxbonuslives < 0 ? INT32_MAX : mapheaderinfo[prevmap]->maxbonuslives));
if (ptlives && awarddenial == 2) if (ptlives && awarddenial != 2)
P_GivePlayerLives(&players[i], ptlives); P_GivePlayerLives(&players[i], ptlives);
if (i == consoleplayer) if (i == consoleplayer)
...@@ -2161,7 +2161,7 @@ static void Y_AwardSpecialStageBonus(int awarddenial) ...@@ -2161,7 +2161,7 @@ static void Y_AwardSpecialStageBonus(int awarddenial)
(INT32)((!ultimatemode && !modeattacking && players[i].lives != INFLIVES) ? max((INT32)((players[i].score / 50000) - (oldscore / 50000)), (INT32)0) : 0), (INT32)((!ultimatemode && !modeattacking && players[i].lives != INFLIVES) ? max((INT32)((players[i].score / 50000) - (oldscore / 50000)), (INT32)0) : 0),
(INT32)(mapheaderinfo[prevmap]->maxbonuslives < 0 ? INT32_MAX : mapheaderinfo[prevmap]->maxbonuslives)); (INT32)(mapheaderinfo[prevmap]->maxbonuslives < 0 ? INT32_MAX : mapheaderinfo[prevmap]->maxbonuslives));
if (awarddenial == 2) if (awarddenial != 2)
{ {
players[i].score += localbonuses[0].points; players[i].score += localbonuses[0].points;
players[i].score += localbonuses[1].points; players[i].score += localbonuses[1].points;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment