mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Merge branch 'bustflags' into 'next'
Bustable Wall and Floor flags. See merge request STJr/SRB2!1163
This commit is contained in:
commit
7f65023891
4 changed files with 12 additions and 10 deletions
|
@ -51,6 +51,7 @@ 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)
|
||||
// free up to and including 1<<31
|
||||
} skinflags_t;
|
||||
|
||||
|
|
|
@ -9701,6 +9701,7 @@ struct {
|
|||
{"SF_NONIGHTSSUPER",SF_NONIGHTSSUPER},
|
||||
{"SF_NOSUPERSPRITES",SF_NOSUPERSPRITES},
|
||||
{"SF_NOSUPERJUMPBOOST",SF_NOSUPERJUMPBOOST},
|
||||
{"SF_CANBUSTWALLS",SF_CANBUSTWALLS},
|
||||
|
||||
// Dashmode constants
|
||||
{"DASHMODE_THRESHOLD",DASHMODE_THRESHOLD},
|
||||
|
|
|
@ -3344,7 +3344,7 @@ static void PTR_GlideClimbTraverse(line_t *li)
|
|||
{
|
||||
for (rover = checksector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || (rover->flags & FF_BUSTUP))
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (slidemo->player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, slidemo->x, slidemo->y);
|
||||
|
|
18
src/p_user.c
18
src/p_user.c
|
@ -2564,7 +2564,7 @@ static boolean P_PlayerCanBust(player_t *player, ffloor_t *rover)
|
|||
}
|
||||
|
||||
// Strong abilities can break even FF_STRONGBUST.
|
||||
if (player->charability == CA_GLIDEANDCLIMB)
|
||||
if (player->charflags & SF_CANBUSTWALLS)
|
||||
return true;
|
||||
|
||||
if (player->pflags & PF_BOUNCING)
|
||||
|
@ -2611,10 +2611,10 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
|
||||
if ((netgame || multiplayer) && player->spectator)
|
||||
return;
|
||||
|
||||
|
||||
oldx = player->mo->x;
|
||||
oldy = player->mo->y;
|
||||
|
||||
|
||||
if (!(player->pflags & PF_BOUNCING)) // Bouncers only get to break downwards, not sideways
|
||||
{
|
||||
P_UnsetThingPosition(player->mo);
|
||||
|
@ -2633,7 +2633,7 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
|
||||
if (!node->m_sector->ffloors)
|
||||
continue;
|
||||
|
||||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!P_PlayerCanBust(player, rover))
|
||||
|
@ -3214,7 +3214,7 @@ static void P_DoClimbing(player_t *player)
|
|||
|
||||
for (rover = glidesector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || (rover->flags & FF_BUSTUP))
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
floorclimb = true;
|
||||
|
@ -3255,7 +3255,7 @@ static void P_DoClimbing(player_t *player)
|
|||
// Is there a FOF directly below this one that we can move onto?
|
||||
for (roverbelow = glidesector->sector->ffloors; roverbelow; roverbelow = roverbelow->next)
|
||||
{
|
||||
if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || (roverbelow->flags & FF_BUSTUP))
|
||||
if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
if (roverbelow == rover)
|
||||
|
@ -3300,7 +3300,7 @@ static void P_DoClimbing(player_t *player)
|
|||
// Is there a FOF directly below this one that we can move onto?
|
||||
for (roverbelow = glidesector->sector->ffloors; roverbelow; roverbelow = roverbelow->next)
|
||||
{
|
||||
if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || (roverbelow->flags & FF_BUSTUP))
|
||||
if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
if (roverbelow == rover)
|
||||
|
@ -3357,7 +3357,7 @@ static void P_DoClimbing(player_t *player)
|
|||
ffloor_t *rover;
|
||||
for (rover = glidesector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || (rover->flags & FF_BUSTUP))
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
bottomheight = P_GetFFloorBottomZAt(rover, player->mo->x, player->mo->y);
|
||||
|
@ -3397,7 +3397,7 @@ static void P_DoClimbing(player_t *player)
|
|||
ffloor_t *rover;
|
||||
for (rover = glidesector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || (rover->flags & FF_BUSTUP))
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt(rover, player->mo->x, player->mo->y);
|
||||
|
|
Loading…
Reference in a new issue