Merge branch 'ss-damage-fix' into 'next'

Fix Special Stages crashing upon taking damage

See merge request STJr/SRB2!839
This commit is contained in:
SteelT 2020-03-06 17:59:57 -05:00
commit bb56aa603f
1 changed files with 2 additions and 2 deletions

View File

@ -3441,7 +3441,7 @@ void P_SpecialStageDamage(player_t *player, mobj_t *inflictor, mobj_t *source)
if (player->powers[pw_invulnerability] || player->powers[pw_flashing] || player->powers[pw_super])
return;
if (!cv_friendlyfire.value)
if (!cv_friendlyfire.value && source && source->player)
{
if (inflictor->type == MT_LHRT && !(player->powers[pw_shield] & SH_NOSTACK))
{
@ -3456,7 +3456,7 @@ void P_SpecialStageDamage(player_t *player, mobj_t *inflictor, mobj_t *source)
return;
}
if (inflictor->type == MT_LHRT)
if (inflictor && inflictor->type == MT_LHRT)
return;
if (player->powers[pw_shield] || player->bot) //If One-Hit Shield