Skip to content

Commit

Permalink
Heretic: Fixed a segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 9, 2011
1 parent 7636c01 commit b6c468e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions doomsday/plugins/jheretic/src/p_enemy.c
Expand Up @@ -2335,7 +2335,7 @@ void C_DECL A_SkullPop(mobj_t* actor)
if((mo = P_SpawnMobj3f(MT_BLOODYSKULL, actor->pos[VX], actor->pos[VY],
actor->pos[VZ] + 48, actor->angle, 0)))
{
player_t* player;
player_t* player;

mo->mom[MX] = FIX2FLT((P_Random() - P_Random()) << 9);
mo->mom[MY] = FIX2FLT((P_Random() - P_Random()) << 9);
Expand All @@ -2348,12 +2348,15 @@ void C_DECL A_SkullPop(mobj_t* actor)
actor->flags &= ~MF_SOLID;

mo->player = player;
mo->dPlayer = player->plr;
mo->dPlayer = (player? player->plr : 0);
mo->health = actor->health;

player->plr->mo = mo;
player->plr->lookDir = 0;
player->damageCount = 32;
if(player)
{
player->plr->mo = mo;
player->plr->lookDir = 0;
player->damageCount = 32;
}
}
}

Expand Down

0 comments on commit b6c468e

Please sign in to comment.