From 965e1f6b4507fe3f050a814bef734485cabaf65a Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 28 May 2017 17:07:20 +0100 Subject: [PATCH] * Make 100 rings give everyone a oneup in New Coop. * Make oneup boxes only give everyone a oneup in New Coop. --- src/p_enemy.c | 26 ++++++++++++++++---------- src/p_user.c | 21 +++++++++++++++++++-- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 860feb916..7bc6090e4 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3286,20 +3286,26 @@ void A_ExtraLife(mobj_t *actor) } else { - INT32 i; - for (i = 0; i < MAXPLAYERS; i++) + if (!((netgame || multiplayer) && gametype == GT_COOP)) + P_GivePlayerLives(player, 1); + P_PlayLivesJingle(player); + else { - if (!playeringame[i]) - continue; + INT32 i; + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; - if ((netgame || multiplayer) && players[i].spectator) // Ignore spectators - continue; + if ((netgame || multiplayer) && players[i].spectator) // Ignore spectators + continue; - if (players[i].bot) - continue; + if (players[i].bot) + continue; - P_GivePlayerLives(&players[i], 1); - P_PlayLivesJingle(&players[i]); + P_GivePlayerLives(&players[i], 1); + P_PlayLivesJingle(&players[i]); + } } } } diff --git a/src/p_user.c b/src/p_user.c index 63e9feae7..9a68efef3 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -933,8 +933,25 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings) if (gainlives) { - P_GivePlayerLives(player, gainlives); - P_PlayLivesJingle(player); + INT32 i; + if (!((netgame || multiplayer) && gametype == GT_COOP)) + P_GivePlayerLives(player, gainlives); + P_PlayLivesJingle(player); + else + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; + + if ((netgame || multiplayer) && players[i].spectator) // Ignore spectators + continue; + + if (players[i].bot) + continue; + + P_GivePlayerLives(&players[i], gainlives); + P_PlayLivesJingle(&players[i]); + } } } }