Fix a dumb mistake, add DMG_WOMBO to orbinauts, jawz and banana hits

This commit is contained in:
SinnamonLat 2022-01-22 11:41:49 +01:00
parent ba9ef23b31
commit 191103fec1
3 changed files with 9 additions and 10 deletions

View file

@ -48,7 +48,7 @@ boolean K_OrbinautJawzCollide(mobj_t *t1, mobj_t *t2)
else else
{ {
// Player Damage // Player Damage
P_DamageMobj(t2, t1, t1->target, 1, DMG_WIPEOUT); P_DamageMobj(t2, t1, t1->target, 1, DMG_WIPEOUT|DMG_WOMBO);
K_KartBouncing(t2, t1); K_KartBouncing(t2, t1);
S_StartSound(t2, sfx_s3k7b); S_StartSound(t2, sfx_s3k7b);
} }
@ -143,7 +143,7 @@ boolean K_BananaBallhogCollide(mobj_t *t1, mobj_t *t2)
} }
else else
{ {
P_DamageMobj(t2, t1, t1->target, 1, DMG_NORMAL); P_DamageMobj(t2, t1, t1->target, 1, DMG_NORMAL|DMG_WOMBO);
} }
damageitem = true; damageitem = true;

View file

@ -1930,18 +1930,17 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (combo == false) if (combo == false)
{ {
// Check if we should allow wombo combos (DMG_WOMBO) // Check if we should allow wombo combos (DMG_WOMBO)
boolean allowcombo; boolean allowcombo = false;
// For MISSILE OBJECTS, allow combo BY DEFAULT. If DMG_WOMBO is set, do *NOT* allow it. // For MISSILE OBJECTS, allow combo BY DEFAULT. If DMG_WOMBO is set, do *NOT* allow it.
if (inflictor && !P_MobjWasRemoved(inflictor) && (inflictor->flags & MF_MISSILE)) if (inflictor && !P_MobjWasRemoved(inflictor) && (inflictor->flags & MF_MISSILE) && !(damagetype & DMG_WOMBO))
allowcombo = !(damagetype & DMG_WOMBO); allowcombo = true;
// OTHERWISE, only allow combos IF DMG_WOMBO *IS* set. // OTHERWISE, only allow combos IF DMG_WOMBO *IS* set.
else else if (damagetype & DMG_WOMBO)
allowcombo = (damagetype & DMG_WOMBO); allowcombo = true;
if ((player->mo->hitlag == 0 || allowcombo == false) && player->flashing > 0)
if ((player->mo->hitlag == 0 || !allowcombo) && player->flashing > 0)
{ {
// Post-hit invincibility // Post-hit invincibility
K_DoInstashield(player); K_DoInstashield(player);

View file

@ -486,9 +486,9 @@ typedef struct BasicFF_s
#define DMG_SPECTATOR 0x83 #define DMG_SPECTATOR 0x83
#define DMG_TIMEOVER 0x84 #define DMG_TIMEOVER 0x84
// Masks // Masks
#define DMG_WOMBO 0x10 // Flag - setting this flag allows objects to damage you if you're already in spinout. The effect is reversed on objects with MF_MISSILE (setting it prevents them from comboing in spinout)
#define DMG_STEAL 0x20 // Flag - can steal bumpers, will only deal damage to players, and will not deal damage outside Battle Mode. #define DMG_STEAL 0x20 // Flag - can steal bumpers, will only deal damage to players, and will not deal damage outside Battle Mode.
#define DMG_CANTHURTSELF 0x40 // Flag - cannot hurt your self or your team #define DMG_CANTHURTSELF 0x40 // Flag - cannot hurt your self or your team
#define DMG_WOMBO 0x80 // Flag - setting this flag allows objects to damage you if you're already in spinout. The effect is reversed on objects with MF_MISSILE (setting it prevents them from comboing in spinout)
#define DMG_DEATHMASK DMG_INSTAKILL // if bit 7 is set, this is a death type instead of a damage type #define DMG_DEATHMASK DMG_INSTAKILL // if bit 7 is set, this is a death type instead of a damage type
#define DMG_TYPEMASK 0x0F // Get type without any flags #define DMG_TYPEMASK 0x0F // Get type without any flags