summaryrefslogtreecommitdiff
path: root/src/strife/p_inter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/p_inter.c')
-rw-r--r--src/strife/p_inter.c10
1 files changed, 8 insertions, 2 deletions
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
{