Mantis 0001065:

- Implemented a hybrid wallwalk -- the skulk now only "sticks" if +speed is held down
- Added an IN_WALK flag, syncronized with the server state that can be used in the application to check whether a player is walking
- Walljump is reverted to only jump in the direction the player is looking again, since a running player jumping from a wall usually wants to strafe inwards to stay on the wall

Untickeded bug:
- Fixed bug that caused leap to not behave properly from shallow water

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@191 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-06-16 19:22:08 +00:00
parent 4e405af736
commit 6f80af0426
3 changed files with 13 additions and 7 deletions

View file

@ -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;

View file

@ -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

View file

@ -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);