From 0ce9d9127a7707aceb94c2f263508725438ef9dc Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 14 Dec 2020 04:01:50 -0500 Subject: [PATCH 1/6] add SF_NOSHIELDABILITY --- src/d_player.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d_player.h b/src/d_player.h index eb0372832..0e0f623d3 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -51,7 +51,8 @@ typedef enum SF_NONIGHTSSUPER = 1<<15, // Disable super colors for NiGHTS (if you have SF_SUPER) 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_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; From dfbb1825f460fcc3db33880450fea4c93bd2e648 Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 14 Dec 2020 04:02:17 -0500 Subject: [PATCH 2/6] ditto --- src/deh_tables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/deh_tables.c b/src/deh_tables.c index 5733d9b0e..2a0f179d4 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4987,6 +4987,8 @@ 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}, From 2bebaf12d0f19e97a84577af8c75fa1e1523172a Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 14 Dec 2020 04:03:14 -0500 Subject: [PATCH 3/6] add checks for new flag, make emergency jump call shieldspecial --- src/p_user.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index c5f919c78..f06ad998d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2491,6 +2491,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff) player->mo->momx = player->mo->momy = 0; clipmomz = false; } + else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) // Bubble shield's bounce attack. { P_DoBubbleBounce(player); @@ -5020,7 +5021,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))) { @@ -5043,7 +5044,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) @@ -5491,7 +5492,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); } From 200e444016f61556fb080d956903364fee304abe Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 14 Dec 2020 04:05:14 -0500 Subject: [PATCH 4/6] go away whitespace --- src/deh_tables.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index 2a0f179d4..e92a4f60c 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4989,7 +4989,6 @@ struct int_const_s const INT_CONST[] = { {"SF_CANBUSTWALLS",SF_CANBUSTWALLS}, {"SF_NOSHIELDABILITY",SF_NOSHIELDABILITY}, - // Dashmode constants {"DASHMODE_THRESHOLD",DASHMODE_THRESHOLD}, {"DASHMODE_MAX",DASHMODE_MAX}, From 4521827e2c2b101db0ba3c8ddd114fd8a1b18bc7 Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 14 Dec 2020 04:06:28 -0500 Subject: [PATCH 5/6] you too --- src/p_user.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index f06ad998d..917c7ddf6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2491,7 +2491,6 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff) player->mo->momx = player->mo->momy = 0; clipmomz = false; } - else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) // Bubble shield's bounce attack. { P_DoBubbleBounce(player); From d999e436f1883dead04b1b603a67e3f9efa9e547 Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 14 Dec 2020 20:23:24 -0500 Subject: [PATCH 6/6] GETFLAG --- src/r_skins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/r_skins.c b/src/r_skins.c index 522d9236a..6f150f234 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -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