Permalink
Browse files

Limit sliding to non-bsuit humans

  • Loading branch information...
DolceTriade committed Dec 20, 2015
1 parent cda0276 commit 8a22d80eb6b7e283071029423289f91aaa167038
@@ -13,6 +13,7 @@ regen 0.0
// Abilities
takesFallDamage
canUseLadders
slider

// View
fov 90
@@ -13,6 +13,7 @@ regen 0.0
// Abilities
takesFallDamage
canUseLadders
slider

// View
fov 90
@@ -13,6 +13,7 @@ regen 0.0
// Abilities
takesFallDamage
canUseLadders
slider

// View
fov 90
@@ -1131,6 +1131,10 @@ void BG_ParseClassAttributeFile( const char *filename, classAttributes_t *ca )
{
ca->abilities |= SCA_WALLJUMPER;
}
else if ( !Q_stricmp( token, "slider" ) )
{
ca->abilities |= SCA_SLIDER;
}
else if ( !Q_stricmp( token, "buildDistance" ) )
{
PARSE(text, token);
@@ -1973,10 +1973,12 @@ static void PM_WalkMove()
}

// Slide
if ( pm->cmd.upmove < 0 && VectorLength(pm->ps->velocity) > HUMAN_SLIDE_THRESHOLD )
if ( BG_ClassHasAbility( pm->ps->stats[ STAT_CLASS ], SCA_SLIDER )
&& pm->cmd.upmove < 0
&& VectorLength(pm->ps->velocity) > HUMAN_SLIDE_THRESHOLD )
{
pm->ps->stats[ STAT_STATE ] |= SS_SLIDING;
PM_SlideMove( false );
PM_StepSlideMove( false, true );
PM_Friction();
return;
}
@@ -249,7 +249,7 @@ typedef enum
#define SCA_ALIENSENSE 0x00000010
#define SCA_CANUSELADDERS 0x00000020
#define SCA_WALLJUMPER 0x00000040
#define SCA_SLIDING 0x00000100
#define SCA_SLIDER 0x00000100

// STAT_STATE fields. 16 bit available
#define SS_WALLCLIMBING BIT(0)

0 comments on commit 8a22d80

Please sign in to comment.