Update p_user.c

This commit is contained in:
Radicalicious 2021-06-18 00:57:33 -04:00
parent 863dc6be38
commit 87bcdb8643

View file

@ -2075,7 +2075,19 @@ void P_SpawnThokMobj(player_t *player)
if (type == MT_GHOST)
mobj = P_SpawnGhostMobj(player->mo); // virtually does everything here for us
else
else if (type == MT_THOKEFFECT) // Thok boom effect for Sonic
{
mobj = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->scale * 24, type);
mobj->angle = player->mo->angle + ANGLE_90;
mobj->fuse = 7;
mobj->scale = FRACUNIT / 3;
mobj->destscale = 10*FRACUNIT;
mobj->colorized = true;
mobj->color = player->mo->color;
mobj->momx = -player->mo->momx / 2;
mobj->momy = -player->mo->momy / 2;
}
else // Normal thok object handling
{
if (player->mo->eflags & MFE_VERTICALFLIP)
zheight = player->mo->z + player->mo->height + FixedDiv(P_GetPlayerHeight(player) - player->mo->height, 3*FRACUNIT) - FixedMul(mobjinfo[type].height, player->mo->scale);