mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 02:12:46 +00:00
Add MF_NOHITLAGFORME and DMG_WOMBO
This commit is contained in:
parent
93dfbf382c
commit
ba9ef23b31
5 changed files with 21 additions and 4 deletions
|
|
@ -5809,6 +5809,7 @@ const char *const MOBJFLAG_LIST[] = {
|
|||
"DONTENCOREMAP",
|
||||
"PICKUPFROMBELOW",
|
||||
"NOSQUISH",
|
||||
"NOHITLAGFORME",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -6555,6 +6556,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},
|
||||
|
||||
|
|
|
|||
|
|
@ -3098,7 +3098,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue