diff --git a/src/deh_tables.c b/src/deh_tables.c index 3980e1998..122ce3273 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -5809,6 +5809,7 @@ const char *const MOBJFLAG_LIST[] = { "DONTENCOREMAP", "PICKUPFROMBELOW", "NOSQUISH", + "NOHITLAGFORME", NULL }; @@ -6464,6 +6465,7 @@ struct int_const_s const INT_CONST[] = { //// Masks {"DMG_STEAL",DMG_CANTHURTSELF}, {"DMG_CANTHURTSELF",DMG_CANTHURTSELF}, + {"DMG_WOMBO", DMG_WOMBO}, {"DMG_DEATHMASK",DMG_DEATHMASK}, {"DMG_TYPEMASK",DMG_TYPEMASK}, diff --git a/src/k_kart.c b/src/k_kart.c index 154be4a91..945f7f7a5 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3153,7 +3153,7 @@ angle_t K_MomentumAngle(mobj_t *mo) void K_AddHitLag(mobj_t *mo, INT32 tics, boolean fromDamage) { - if (mo == NULL || P_MobjWasRemoved(mo)) + if (mo == NULL || P_MobjWasRemoved(mo) || mo->flags & MF_NOHITLAGFORME) { return; } diff --git a/src/p_inter.c b/src/p_inter.c index 8fb55c0ad..55d33c360 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1929,7 +1929,19 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da if (combo == false) { - if (player->mo->hitlag == 0 && player->flashing > 0) + // Check if we should allow wombo combos (DMG_WOMBO) + boolean allowcombo; + + // 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)) + allowcombo = !(damagetype & DMG_WOMBO); + + // OTHERWISE, only allow combos IF DMG_WOMBO *IS* set. + else + allowcombo = (damagetype & DMG_WOMBO); + + + if ((player->mo->hitlag == 0 || !allowcombo) && player->flashing > 0) { // Post-hit invincibility K_DoInstashield(player); diff --git a/src/p_local.h b/src/p_local.h index 2cb291b11..1dd631ecb 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -123,7 +123,7 @@ struct demofreecam_s { camera_t *cam; // this is useful when the game is paused, notably mobj_t *soundmobj; // mobj to play sound from, used in s_sound - + angle_t localangle; // keeps track of the cam angle for cmds angle_t localaiming; // ditto with aiming boolean turnheld; // holding turn button for gradual turn speed @@ -488,6 +488,7 @@ typedef struct BasicFF_s // Masks #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_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_TYPEMASK 0x0F // Get type without any flags diff --git a/src/p_mobj.h b/src/p_mobj.h index 53614c5dd..c7ab1f364 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -161,7 +161,9 @@ typedef enum MF_PICKUPFROMBELOW = 1<<29, // Disable momentum-based squash and stretch. MF_NOSQUISH = 1<<30, - // free: to and including 1<<31 + // Disable hitlag for this object + MF_NOHITLAGFORME = 1<<31, + // no more free slots, next up I suppose we can get rid of shit like MF_BOXICON? } mobjflag_t; typedef enum