As I wanted MI to do but he was too exhausted at the time from hardcoding, make the Fang bullet knockback less hardcoded and instead give it MF2_SUPERFIRE.

This commit is contained in:
toaster 2019-06-19 23:29:39 +01:00
parent 2e6898f29e
commit 84ff2a57a1
2 changed files with 5 additions and 6 deletions

View File

@ -3423,14 +3423,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
return true;
}
}
else if (player->powers[pw_invulnerability] || player->powers[pw_flashing] // ignore bouncing & such in invulnerability
|| player->powers[pw_super])
else if (player->powers[pw_invulnerability] || player->powers[pw_flashing] || player->powers[pw_super]) // ignore bouncing & such in invulnerability
{
if (force
|| (player->powers[pw_super]
&& inflictor && inflictor->flags & MF_MISSILE && inflictor->flags2 & MF2_SUPERFIRE) // Super Sonic is stunned!
|| (player->powers[pw_flashing]
&& source && source->type == MT_FANG && inflictor && inflictor->type == MT_CORK)) // Fang's cork bullets knock you back even when flashing
|| (inflictor && inflictor->flags & MF_MISSILE && inflictor->flags2 & MF2_SUPERFIRE)) // Super Sonic is stunned!
{
#ifdef HAVE_BLUA
if (!LUAh_MobjDamage(target, inflictor, source, damage, damagetype))

View File

@ -9164,6 +9164,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_FANG:
sc = 4;
break;
case MT_CORK:
mobj->flags2 |= MF2_SUPERFIRE;
break;
case MT_FBOMB:
mobj->flags2 |= MF2_EXPLOSION;
break;