mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Limit ballswitch bubble contact to once per inflate (PF2_BUBBLECONTACT)
This commit is contained in:
parent
e21745fccc
commit
d16f623a2c
3 changed files with 13 additions and 2 deletions
|
|
@ -139,8 +139,9 @@ typedef enum
|
||||||
PF2_SELFDEAFEN = 1<<2,
|
PF2_SELFDEAFEN = 1<<2,
|
||||||
PF2_SERVERMUTE = 1<<3,
|
PF2_SERVERMUTE = 1<<3,
|
||||||
PF2_SERVERDEAFEN = 1<<4,
|
PF2_SERVERDEAFEN = 1<<4,
|
||||||
PF2_STRICTFASTFALL = 1<<5,
|
PF2_STRICTFASTFALL = 1<<5, // Fastfall only with C, never with A+X. Profile preference.
|
||||||
PF2_ALWAYSDAMAGED = 1<<6,
|
PF2_ALWAYSDAMAGED = 1<<6, // Ignore invulnerability or clash conditions when evaulating damage (P_DamageMobj). Unset after use!
|
||||||
|
PF2_BUBBLECONTACT = 1<<7, // ACHTUNG VERY BAD HACK - Don't allow Bubble Shield to contact certain objects unless this is a fresh blowup.
|
||||||
} pflags2_t;
|
} pflags2_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
||||||
|
|
@ -10627,6 +10627,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
player->bubblecool = 0;
|
player->bubblecool = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->bubbleblowup == 0)
|
||||||
|
player->pflags2 &= ~PF2_BUBBLECONTACT;
|
||||||
|
|
||||||
if (player->itemtype != KITEM_FLAMESHIELD)
|
if (player->itemtype != KITEM_FLAMESHIELD)
|
||||||
{
|
{
|
||||||
if (player->flamedash)
|
if (player->flamedash)
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,13 @@ struct BallSwitch_Ball : mobj_t
|
||||||
|
|
||||||
void Hit(mobj_t *inflictor, mobj_t *source)
|
void Hit(mobj_t *inflictor, mobj_t *source)
|
||||||
{
|
{
|
||||||
|
if (inflictor->type == MT_BUBBLESHIELD && source->player)
|
||||||
|
{
|
||||||
|
if (source->player->pflags2 & PF2_BUBBLECONTACT)
|
||||||
|
return;
|
||||||
|
source->player->pflags2 |= PF2_BUBBLECONTACT;
|
||||||
|
}
|
||||||
|
|
||||||
Push(inflictor, 64 << FRACBITS, 1 << FRACBITS);
|
Push(inflictor, 64 << FRACBITS, 1 << FRACBITS);
|
||||||
K_SetHitLagForObjects(this, inflictor, source, 4, true);
|
K_SetHitLagForObjects(this, inflictor, source, 4, true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue