From 8732dc6b756bc8c0db70a69575c1f02c3c94c1b3 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Wed, 8 Jun 2005 18:57:37 +0000 Subject: [PATCH] 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 --- main/source/pm_shared/pm_shared.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main/source/pm_shared/pm_shared.cpp b/main/source/pm_shared/pm_shared.cpp index 88febff..9f264d3 100644 --- a/main/source/pm_shared/pm_shared.cpp +++ b/main/source/pm_shared/pm_shared.cpp @@ -214,6 +214,7 @@ const float kSkulkRotationLookAhead = 75; const vec3_t kWallstickingDistanceCheck = { 5, 5, 5 }; // tankefugl: 0000972 vec3_t gSurfaceNormal = { 0, 0, 0 }; +bool canWallJump = false; // :tankefugl #ifdef AVH_CLIENT @@ -1410,6 +1411,7 @@ void PM_ParticleAxes(vec3_t origin, vec3_t angles) void NS_UpdateWallsticking() { + canWallJump = true; SetUpgradeMask(&pmove->iuser4, MASK_WALLSTICKING, false); @@ -1486,6 +1488,10 @@ void NS_UpdateWallsticking() } } } + else + { + canWallJump = false; + } // Set wall sticking to true. SetUpgradeMask(&pmove->iuser4, MASK_WALLSTICKING); @@ -5198,7 +5204,7 @@ void PM_Jump (void) } // 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; VectorCopy(pmove->velocity, theDirectionVec);