mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +00:00
Make spinbust behavior consistent with other bustable blocks and rename FF_ONLYKNUX to FF_STRONGBUST
This commit is contained in:
parent
3f42834a98
commit
1604e4d439
5 changed files with 36 additions and 33 deletions
|
@ -1527,7 +1527,7 @@ linedeftypes
|
||||||
title = "Bustable Block";
|
title = "Bustable Block";
|
||||||
prefix = "(254)";
|
prefix = "(254)";
|
||||||
flags8text = "[3] Slope skew sides";
|
flags8text = "[3] Slope skew sides";
|
||||||
flags64text = "[6] Only bustable by Knuckles";
|
flags64text = "[6] Reinforced";
|
||||||
flags128text = "[7] Only block non-players";
|
flags128text = "[7] Only block non-players";
|
||||||
flags512text = "[9] Shattered by pushables";
|
flags512text = "[9] Shattered by pushables";
|
||||||
flags1024text = "[10] Trigger linedef executor";
|
flags1024text = "[10] Trigger linedef executor";
|
||||||
|
|
|
@ -8915,9 +8915,9 @@ struct {
|
||||||
{"FF_PLATFORM",FF_PLATFORM}, ///< You can jump up through this to the top.
|
{"FF_PLATFORM",FF_PLATFORM}, ///< You can jump up through this to the top.
|
||||||
{"FF_REVERSEPLATFORM",FF_REVERSEPLATFORM}, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
{"FF_REVERSEPLATFORM",FF_REVERSEPLATFORM}, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||||
{"FF_INTANGABLEFLATS",FF_INTANGABLEFLATS}, ///< Both flats are intangable, but the sides are still solid.
|
{"FF_INTANGABLEFLATS",FF_INTANGABLEFLATS}, ///< Both flats are intangable, but the sides are still solid.
|
||||||
{"FF_SHATTER",FF_SHATTER}, ///< Used with ::FF_BUSTUP. Thinks everyone's Knuckles.
|
{"FF_SHATTER",FF_SHATTER}, ///< Used with ::FF_BUSTUP. Bustable on mere touch.
|
||||||
{"FF_SPINBUST",FF_SPINBUST}, ///< Used with ::FF_BUSTUP. Jump or fall onto it while curled in a ball.
|
{"FF_SPINBUST",FF_SPINBUST}, ///< Used with ::FF_BUSTUP. Also bustable if you're in your spinning frames.
|
||||||
{"FF_ONLYKNUX",FF_ONLYKNUX}, ///< Used with ::FF_BUSTUP. Only Knuckles can break this rock.
|
{"FF_STRONGBUST",FF_STRONGBUST }, ///< Used with ::FF_BUSTUP. Only bustable by "strong" characters (Knuckles) and abilities (bouncing, twinspin, melee).
|
||||||
{"FF_RIPPLE",FF_RIPPLE}, ///< Ripple the flats
|
{"FF_RIPPLE",FF_RIPPLE}, ///< Ripple the flats
|
||||||
{"FF_COLORMAPONLY",FF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel
|
{"FF_COLORMAPONLY",FF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel
|
||||||
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
||||||
|
|
|
@ -7089,7 +7089,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
case 254: // Bustable block
|
case 254: // Bustable block
|
||||||
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_BUSTUP;
|
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_BUSTUP;
|
||||||
if (lines[i].flags & ML_NOCLIMB)
|
if (lines[i].flags & ML_NOCLIMB)
|
||||||
ffloorflags |= FF_ONLYKNUX;
|
ffloorflags |= FF_STRONGBUST;
|
||||||
|
|
||||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||||
break;
|
break;
|
||||||
|
|
53
src/p_user.c
53
src/p_user.c
|
@ -2456,39 +2456,42 @@ static void P_CheckBustableBlocks(player_t *player)
|
||||||
|
|
||||||
if ((rover->flags & FF_BUSTUP)/* && !rover->master->frontsector->crumblestate*/)
|
if ((rover->flags & FF_BUSTUP)/* && !rover->master->frontsector->crumblestate*/)
|
||||||
{
|
{
|
||||||
// If it's an FF_SPINBUST, you have to either be jumping, or coming down
|
// If it's an FF_SHATTER, you can break it just by touching it.
|
||||||
// onto the top from a spin.
|
if (rover->flags & FF_SHATTER)
|
||||||
if (rover->flags & FF_SPINBUST && ((!(player->pflags & PF_JUMPED) && !(player->pflags & PF_SPINNING) && !(player->pflags & PF_BOUNCING)) || (player->pflags & PF_STARTDASH)))
|
goto bust;
|
||||||
|
|
||||||
|
// If it's an FF_SPINBUST, you can break it if you are in your spinning frames
|
||||||
|
// (either from jumping or spindashing).
|
||||||
|
if (rover->flags & FF_SPINBUST
|
||||||
|
&& (((player->pflags & PF_SPINNING) && !(player->pflags & PF_STARTDASH))
|
||||||
|
|| (player->pflags & PF_JUMPED && !(player->pflags & PF_NOJUMPDAMAGE))))
|
||||||
|
goto bust;
|
||||||
|
|
||||||
|
// You can always break it if you have CA_GLIDEANDCLIMB
|
||||||
|
// or if you are bouncing on it
|
||||||
|
// or you are using CA_TWINSPIN/CA2_MELEE.
|
||||||
|
if (player->charability == CA_GLIDEANDCLIMB
|
||||||
|
|| (player->pflags & PF_BOUNCING)
|
||||||
|
|| ((player->charability == CA_TWINSPIN) && (player->panim == PA_ABILITY))
|
||||||
|
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2))
|
||||||
|
goto bust;
|
||||||
|
|
||||||
|
if (rover->flags & FF_STRONGBUST)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// if it's not an FF_SHATTER, you must be spinning (and not jumping)
|
// If it's not an FF_STRONGBUST, you can break if you are spinning (and not jumping)
|
||||||
// or be super
|
// or you are super
|
||||||
// or have CA_GLIDEANDCLIMB
|
// or you are in dashmode with SF_DASHMODE
|
||||||
// or be in dashmode with SF_DASHMODE
|
// or you are drilling in NiGHTS
|
||||||
// or be using CA_TWINSPIN
|
// or you are recording for Metal Sonic
|
||||||
// or be using CA2_MELEE
|
if (!((player->pflags & PF_SPINNING) && !(player->pflags & PF_JUMPED))
|
||||||
// or are drilling in NiGHTS
|
|
||||||
// or are recording for Metal Sonic
|
|
||||||
if (!(rover->flags & FF_SHATTER) && !(rover->flags & FF_SPINBUST)
|
|
||||||
&& !((player->pflags & PF_SPINNING) && !(player->pflags & PF_JUMPED))
|
|
||||||
&& !(player->powers[pw_super])
|
&& !(player->powers[pw_super])
|
||||||
&& !(player->charability == CA_GLIDEANDCLIMB)
|
|
||||||
&& !(player->pflags & PF_BOUNCING)
|
|
||||||
&& !((player->charflags & SF_DASHMODE) && (player->dashmode >= 3*TICRATE))
|
&& !((player->charflags & SF_DASHMODE) && (player->dashmode >= 3*TICRATE))
|
||||||
&& !((player->charability == CA_TWINSPIN) && (player->panim == PA_ABILITY))
|
|
||||||
&& !(player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
|
||||||
&& !(player->pflags & PF_DRILLING)
|
&& !(player->pflags & PF_DRILLING)
|
||||||
&& !metalrecording)
|
&& !metalrecording)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Only players with CA_GLIDEANDCLIMB, or CA_TWINSPIN/CA2_MELEE users can break this rock...
|
bust:
|
||||||
if (!(rover->flags & FF_SHATTER) && (rover->flags & FF_ONLYKNUX)
|
|
||||||
&& !(player->charability == CA_GLIDEANDCLIMB
|
|
||||||
|| (player->pflags & PF_BOUNCING)
|
|
||||||
|| ((player->charability == CA_TWINSPIN) && (player->panim == PA_ABILITY))
|
|
||||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||||
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||||
|
|
||||||
|
|
|
@ -139,9 +139,9 @@ typedef enum
|
||||||
FF_PLATFORM = 0x2000000, ///< You can jump up through this to the top.
|
FF_PLATFORM = 0x2000000, ///< You can jump up through this to the top.
|
||||||
FF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
FF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||||
FF_INTANGABLEFLATS = 0x6000000, ///< Both flats are intangable, but the sides are still solid.
|
FF_INTANGABLEFLATS = 0x6000000, ///< Both flats are intangable, but the sides are still solid.
|
||||||
FF_SHATTER = 0x8000000, ///< Used with ::FF_BUSTUP. Thinks everyone's Knuckles.
|
FF_SHATTER = 0x8000000, ///< Used with ::FF_BUSTUP. Bustable on mere touch.
|
||||||
FF_SPINBUST = 0x10000000, ///< Used with ::FF_BUSTUP. Jump or fall onto it while curled in a ball.
|
FF_SPINBUST = 0x10000000, ///< Used with ::FF_BUSTUP. Also bustable if you're in your spinning frames.
|
||||||
FF_ONLYKNUX = 0x20000000, ///< Used with ::FF_BUSTUP. Only Knuckles can break this rock.
|
FF_STRONGBUST = 0x20000000, ///< Used with ::FF_BUSTUP. Only bustable by "strong" characters (Knuckles) and abilities (bouncing, twinspin, melee).
|
||||||
FF_RIPPLE = 0x40000000, ///< Ripple the flats
|
FF_RIPPLE = 0x40000000, ///< Ripple the flats
|
||||||
FF_COLORMAPONLY = 0x80000000, ///< Only copy the colormap, not the lightlevel
|
FF_COLORMAPONLY = 0x80000000, ///< Only copy the colormap, not the lightlevel
|
||||||
FF_GOOWATER = FF_SHATTERBOTTOM, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
FF_GOOWATER = FF_SHATTERBOTTOM, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
||||||
|
|
Loading…
Reference in a new issue