Pterabyte: Don't target players who are invincible after being hurt

This commit is contained in:
MascaraSnake 2019-09-29 19:29:34 +02:00
parent 9431497f7d
commit c00144a4f8
2 changed files with 7 additions and 0 deletions

View File

@ -8605,6 +8605,7 @@ struct {
{"CR_MINECART",CR_MINECART},
{"CR_ROLLOUT", CR_ROLLOUT},
{"CR_PTERABYTE",CR_PTERABYTE},
// Ring weapons (ringweapons_t)
// Useful for A_GiveWeapon
{"RW_AUTO",RW_AUTO},

View File

@ -9107,6 +9107,12 @@ void P_MobjThinker(mobj_t *mobj)
if (!mobj->target)
break;
if (mobj->target->player->powers[pw_flashing])
{
P_SetTarget(&mobj->target, NULL);
break;
}
vdist = mobj->z - mobj->target->z - mobj->target->height;
if (vdist <= 0)
{