ref: 8de669ac9b3d53144e201abf62982d0e31d56940
parent: 1b7d9ea6f72b2fdaae747f0d453b8bca214fa255
author: James Haley <[email protected]>
date: Fri Feb 25 22:36:24 EST 2011
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
--- a/src/strife/f_finale.c
+++ b/src/strife/f_finale.c
@@ -329,7 +329,7 @@
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;
--- a/src/strife/p_inter.c
+++ b/src/strife/p_inter.c
@@ -244,8 +244,10 @@
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 @@
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
{