diff options
author | James Haley | 2011-02-26 03:36:24 +0000 |
---|---|---|
committer | James Haley | 2011-02-26 03:36:24 +0000 |
commit | 8de669ac9b3d53144e201abf62982d0e31d56940 (patch) | |
tree | 828d9b9f08bf00dfe280825cbc3588754ad7faaf | |
parent | 1b7d9ea6f72b2fdaae747f0d453b8bca214fa255 (diff) | |
download | chocolate-doom-8de669ac9b3d53144e201abf62982d0e31d56940.tar.gz chocolate-doom-8de669ac9b3d53144e201abf62982d0e31d56940.tar.bz2 chocolate-doom-8de669ac9b3d53144e201abf62982d0e31d56940.zip |
P_GiveBody seems to need a P_SubstNullMobj, otherwise a crash occurs in
P_DestroyConverter when it tries to give items to players that aren't in
the game... needs add'l verification. Also fixed first frame of the good
ending (how the hell did that get screwed up??)
Subversion-branch: /branches/strife-branch
Subversion-revision: 2279
-rw-r--r-- | src/strife/f_finale.c | 2 | ||||
-rw-r--r-- | src/strife/p_inter.c | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/strife/f_finale.c b/src/strife/f_finale.c index 1761ad44..32d09021 100644 --- a/src/strife/f_finale.c +++ b/src/strife/f_finale.c @@ -329,7 +329,7 @@ static void F_DoSlideShow(void) break; case SLIDE_GOODEND1: // state #10 - slideshow_panel = DEH_String("SS4F2"); + slideshow_panel = DEH_String("SS4F1"); S_StartMusic(mus_happy); I_StartVoice(DEH_String("RIE01")); slideshow_state = SLIDE_GOODEND2; diff --git a/src/strife/p_inter.c b/src/strife/p_inter.c index 7eed93bc..e2f54adc 100644 --- a/src/strife/p_inter.c +++ b/src/strife/p_inter.c @@ -244,8 +244,10 @@ boolean P_GiveBody(player_t* player, int num) maxhealth = MAXHEALTH + player->stamina; - if(num >= 0) // haleyjd 09/23/10: fixed to give proper amount of health + if(num >= 0) // haleyjd 20100923: fixed to give proper amount of health { + mobj_t *mo; // haleyjd 20110225: needed below... + // any healing to do? if(player->health >= maxhealth) return false; @@ -256,7 +258,11 @@ boolean P_GiveBody(player_t* player, int num) player->health = maxhealth; // Set mo->health for consistency. - player->mo->health = player->health; + // haleyjd 20110225: Seems Strife can call this on a NULL player->mo + // when giving items to players that are not in the game... + // STRIFE-FIXME: needs major verification! + mo = P_SubstNullMobj(player->mo); + mo->health = player->health; } else { |