diff --git a/main/source/cl_dll/input.cpp b/main/source/cl_dll/input.cpp index 9a31d67..bf1dd23 100644 --- a/main/source/cl_dll/input.cpp +++ b/main/source/cl_dll/input.cpp @@ -1327,7 +1327,12 @@ int CL_ButtonBits( int bResetState ) { bits |= IN_ATTACK; } - + + if ( in_speed.state & 3 ) + { + bits |= IN_WALK; + } + // tankefugl: duck toggle if ( g_bDuckToggled ) { @@ -1416,6 +1421,7 @@ int CL_ButtonBits( int bResetState ) if ( bResetState ) { in_attack.state &= ~2; + in_speed.state &= ~2; in_duck.state &= ~2; in_jump.state &= ~2; in_forward.state &= ~2; diff --git a/main/source/common/in_buttons.h b/main/source/common/in_buttons.h index 1894b0a..5a499a8 100644 --- a/main/source/common/in_buttons.h +++ b/main/source/common/in_buttons.h @@ -30,7 +30,7 @@ #define IN_MOVELEFT (1 << 9) #define IN_MOVERIGHT (1 << 10) #define IN_ATTACK2 (1 << 11) -#define IN_RUN (1 << 12) +#define IN_WALK (1 << 12) #define IN_RELOAD (1 << 13) #define IN_ALT1 (1 << 14) #define IN_SCORE (1 << 15) // Used by client.dll for when scoreboard is held down diff --git a/main/source/pm_shared/pm_shared.cpp b/main/source/pm_shared/pm_shared.cpp index 9f264d3..fd6c1a3 100644 --- a/main/source/pm_shared/pm_shared.cpp +++ b/main/source/pm_shared/pm_shared.cpp @@ -1469,12 +1469,12 @@ void NS_UpdateWallsticking() { //float dotNormalView = DotProduct(pmove->forward, theSurfaceNormal); vec3_t tempNormal = {0, 0, 0}; - bool checkedDownOffset = NS_CheckOffsetFromOrigin(0, 0, theMinPoint[2] * 2, tempNormal); + bool checkedDownOffset = NS_CheckOffsetFromOrigin(0, 0, theMinPoint[2], tempNormal); if (/*dotNormalView < 0.7 && */(checkedDownOffset == false)) { VectorCopy(theSurfaceNormal, gSurfaceNormal); - if (theSurfaceNormal[2] < 0.7) + if (/*theSurfaceNormal[2] < 0.7 && */(pmove->cmd.buttons & IN_WALK)) { vec3_t theDispVect; VectorScale(theSurfaceNormal, theMinPoint[0], theDispVect); @@ -4366,7 +4366,7 @@ void PM_AlienAbilities() AvHMUGetEnergyCost(AVH_ABILITY_LEAP, theEnergyCost); // tankefugl: 0000972 // Add highjacked "watertime" to release leaping skulk from wall - pmove->waterjumptime = 75; + // pmove->waterjumptime = 75; // :tankefugl } @@ -5207,8 +5207,8 @@ void PM_Jump (void) 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); - if (Length(theDirectionVec) == 0.0f) + //VectorCopy(pmove->velocity, theDirectionVec); + //if (Length(theDirectionVec) == 0.0f) VectorCopy(pmove->forward, theDirectionVec); VectorNormalize(theDirectionVec);