Commit 84e9020e by James R.

Merge branch 'shieldless' into 'next'

Add new skin flag SF_NOSHIELDABILITY See merge request !1331
parents a36908a5 d999e436
......@@ -52,6 +52,8 @@ typedef enum
SF_NOSUPERSPRITES = 1<<16, // Don't use super sprites while super
SF_NOSUPERJUMPBOOST = 1<<17, // Disable the jump boost given while super (i.e. Knuckles)
SF_CANBUSTWALLS = 1<<18, // Can naturally bust walls on contact? (i.e. Knuckles)
SF_NOSHIELDABILITY = 1<<19, // Disable shield abilities
// free up to and including 1<<31
} skinflags_t;
......
......@@ -5022,6 +5022,7 @@ struct int_const_s const INT_CONST[] = {
{"SF_NOSUPERSPRITES",SF_NOSUPERSPRITES},
{"SF_NOSUPERJUMPBOOST",SF_NOSUPERJUMPBOOST},
{"SF_CANBUSTWALLS",SF_CANBUSTWALLS},
{"SF_NOSHIELDABILITY",SF_NOSHIELDABILITY},
// Dashmode constants
{"DASHMODE_THRESHOLD",DASHMODE_THRESHOLD},
......
......@@ -5024,7 +5024,7 @@ static boolean P_PlayerShieldThink(player_t *player, ticcmd_t *cmd, mobj_t *lock
if ((player->powers[pw_shield] & SH_NOSTACK) && !player->powers[pw_super] && !(player->pflags & PF_SPINDOWN)
&& ((!(player->pflags & PF_THOKKED) || (((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP || (player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT) && player->secondjump == UINT8_MAX) ))) // thokked is optional if you're bubblewrapped / 3dblasted
{
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT)
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT && !(player->charflags & SF_NOSHIELDABILITY))
{
if ((lockonshield = P_LookForEnemies(player, false, false)))
{
......@@ -5047,7 +5047,7 @@ static boolean P_PlayerShieldThink(player_t *player, ticcmd_t *cmd, mobj_t *lock
}
}
}
if (cmd->buttons & BT_SPIN && !LUAh_ShieldSpecial(player)) // Spin button effects
if ((!(player->charflags & SF_NOSHIELDABILITY)) && (cmd->buttons & BT_SPIN && !LUAh_ShieldSpecial(player))) // Spin button effects
{
// Force stop
if ((player->powers[pw_shield] & ~(SH_FORCEHP|SH_STACK)) == SH_FORCE)
......@@ -5495,7 +5495,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
break;
}
}
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_WHIRLWIND && !player->powers[pw_super])
else if ((!(player->charflags & SF_NOSHIELDABILITY)) && ((player->powers[pw_shield] & SH_NOSTACK) == SH_WHIRLWIND && !player->powers[pw_super] && !LUAh_ShieldSpecial(player)))
P_DoJumpShield(player);
}
......
......@@ -514,6 +514,7 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value)
GETFLAG(NOSUPERSPRITES)
GETFLAG(NOSUPERJUMPBOOST)
GETFLAG(CANBUSTWALLS)
GETFLAG(NOSHIELDABILITY)
#undef GETFLAG
else // let's check if it's a sound, otherwise error out
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment