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.

# Conflicts:
#	src/p_mobj.c
This commit is contained in:
toaster 2019-06-22 17:03:10 +01:00
parent e20949ef77
commit 81882b63b8
2 changed files with 5 additions and 6 deletions

View file

@ -3464,14 +3464,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
return true; return true;
} }
} }
else if (player->powers[pw_invulnerability] || player->powers[pw_flashing] // ignore bouncing & such in invulnerability else if (player->powers[pw_invulnerability] || player->powers[pw_flashing] || player->powers[pw_super]) // ignore bouncing & such in invulnerability
|| player->powers[pw_super])
{ {
if (force if (force
|| (player->powers[pw_super] || (inflictor && inflictor->flags & MF_MISSILE && inflictor->flags2 & MF2_SUPERFIRE)) // Super Sonic is stunned!
&& 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
{ {
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
if (!LUAh_MobjDamage(target, inflictor, source, damage, damagetype)) if (!LUAh_MobjDamage(target, inflictor, source, damage, damagetype))

View file

@ -9329,6 +9329,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
if (nummaprings >= 0) if (nummaprings >= 0)
nummaprings++; nummaprings++;
break; break;
case MT_CORK:
mobj->flags2 |= MF2_SUPERFIRE;
break;
case MT_FBOMB: case MT_FBOMB:
mobj->flags2 |= MF2_EXPLOSION; mobj->flags2 |= MF2_EXPLOSION;
break; break;