*** RAVEN'S CODE *************************************************************** void A_SkullPop(mobj_t *actor) { mobj_t *mo; player_t *player; actor->flags &= ~MF_SOLID; mo = P_SpawnMobj(actor->x, actor->y, actor->z+48*FRACUNIT, MT_BLOODYSKULL); //mo->target = actor; mo->momx = (P_Random()-P_Random())<<9; mo->momy = (P_Random()-P_Random())<<9; mo->momz = FRACUNIT*2+(P_Random()<<6); // Attach player mobj to bloody skull player = actor->player; actor->player = NULL; mo->player = player; mo->health = actor->health; mo->angle = actor->angle; player->mo = mo; player->lookdir = 0; player->damagecount = 32; } *** EE'S CODE ****************************************************************** void A_PlayerSkull(mobj_t *actor) { mobj_t *head; static int skullType = -1; if(skullType == -1) skullType = E_SafeThingType(MT_HPLAYERSKULL); head = P_SpawnMobj(actor->x, actor->y, actor->z + SKULLHEIGHT, skullType); // transfer player to head head->player = actor->player; head->health = actor->health; head->angle = actor->angle; // clear old body of player actor->flags &= ~MF_SOLID; actor->player = NULL; // fiddle with player properties head->player->mo = head; // set player's thing to head head->player->pitch = 0; // don't look up or down head->player->damagecount = 32; // see red for a while // send head flying head->momx = 512 * P_SubRandom(pr_skullpop); head->momy = 512 * P_SubRandom(pr_skullpop); head->momz = 64 * P_Random(pr_skullpop) + 2 * FRACUNIT; }