mirror of
https://github.com/ENSL/NS.git
synced 2024-11-26 06:20:57 +00:00
Mantis 0000972:
o Removed the ability to walljump off the ground in some special cases. Added a check to disable wallwalk if something is found 10 units below the player. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@170 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
39710b46ee
commit
8732dc6b75
1 changed files with 7 additions and 1 deletions
|
@ -214,6 +214,7 @@ const float kSkulkRotationLookAhead = 75;
|
||||||
const vec3_t kWallstickingDistanceCheck = { 5, 5, 5 };
|
const vec3_t kWallstickingDistanceCheck = { 5, 5, 5 };
|
||||||
// tankefugl: 0000972
|
// tankefugl: 0000972
|
||||||
vec3_t gSurfaceNormal = { 0, 0, 0 };
|
vec3_t gSurfaceNormal = { 0, 0, 0 };
|
||||||
|
bool canWallJump = false;
|
||||||
// :tankefugl
|
// :tankefugl
|
||||||
|
|
||||||
#ifdef AVH_CLIENT
|
#ifdef AVH_CLIENT
|
||||||
|
@ -1410,6 +1411,7 @@ void PM_ParticleAxes(vec3_t origin, vec3_t angles)
|
||||||
|
|
||||||
void NS_UpdateWallsticking()
|
void NS_UpdateWallsticking()
|
||||||
{
|
{
|
||||||
|
canWallJump = true;
|
||||||
|
|
||||||
SetUpgradeMask(&pmove->iuser4, MASK_WALLSTICKING, false);
|
SetUpgradeMask(&pmove->iuser4, MASK_WALLSTICKING, false);
|
||||||
|
|
||||||
|
@ -1486,6 +1488,10 @@ void NS_UpdateWallsticking()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
canWallJump = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Set wall sticking to true.
|
// Set wall sticking to true.
|
||||||
SetUpgradeMask(&pmove->iuser4, MASK_WALLSTICKING);
|
SetUpgradeMask(&pmove->iuser4, MASK_WALLSTICKING);
|
||||||
|
@ -5198,7 +5204,7 @@ void PM_Jump (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// tankefugl: 0000972 walljump
|
// tankefugl: 0000972 walljump
|
||||||
if (GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && (pmove->cmd.buttons & IN_JUMP) && !(pmove->oldbuttons & IN_JUMP) && (gSurfaceNormal[2] < 0.3))
|
if (canWallJump && (GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && (pmove->cmd.buttons & IN_JUMP) && !(pmove->oldbuttons & IN_JUMP) && (gSurfaceNormal[2] < 0.3)))
|
||||||
{
|
{
|
||||||
vec3_t theDirectionVec;
|
vec3_t theDirectionVec;
|
||||||
VectorCopy(pmove->velocity, theDirectionVec);
|
VectorCopy(pmove->velocity, theDirectionVec);
|
||||||
|
|
Loading…
Reference in a new issue