Do a quake effect when hit by non-spinout things or explosions

This commit is contained in:
Sryder13 2017-10-24 22:58:59 +01:00
parent 7f87a0275b
commit fe31394277
2 changed files with 11 additions and 0 deletions

View file

@ -1697,6 +1697,12 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
P_PlayRinglossSound(player->mo); P_PlayRinglossSound(player->mo);
if (P_IsLocalPlayer(player))
{
quake.intensity = 64*FRACUNIT;
quake.time = 5;
}
return; return;
} }

View file

@ -3131,6 +3131,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (inflictor->type == MT_GREENITEM || inflictor->type == MT_REDITEM || inflictor->type == MT_REDITEMDUD) if (inflictor->type == MT_GREENITEM || inflictor->type == MT_REDITEM || inflictor->type == MT_REDITEMDUD)
P_PlayerRingBurst(player, 5); P_PlayerRingBurst(player, 5);
player->mo->momx = player->mo->momy = 0; player->mo->momx = player->mo->momy = 0;
if (P_IsLocalPlayer(player))
{
quake.intensity = 32*FRACUNIT;
quake.time = 5;
}
return true; return true;
} }
/* // SRB2kart - don't need these /* // SRB2kart - don't need these