Mantis 0000972:

- Removed check for the player's view angle -- the skulk will now stick no matter which direction the player is looking.
- Reversed the wallwalk toggle: Press duck to grab on to the wall. Use toggleduck to reverse.

Mantis 0001048:
- The skulk now either 1) jumps in the direction the movement keys are pressed (forward, backward, strafe, combinations) or 2) forward if none are pressed.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@135 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-05-25 20:16:26 +00:00
parent 58c50b1399
commit ff914175c0

View file

@ -1422,7 +1422,7 @@ void NS_UpdateWallsticking()
if (pmove->waterjumptime < 0) if (pmove->waterjumptime < 0)
pmove->waterjumptime = 0; pmove->waterjumptime = 0;
if(!(pmove->cmd.buttons & IN_DUCK) && !(pmove->oldbuttons & IN_JUMP) && (pmove->waterlevel < 2)) //&& ((pmove->onground != -1) || (pmove->numtouch > 0))) if((pmove->cmd.buttons & IN_DUCK) && !(pmove->oldbuttons & IN_JUMP) && (pmove->waterlevel < 2))
// if(!(pmove->cmd.buttons & IN_DUCK)) //&& ((pmove->onground != -1) || (pmove->numtouch > 0))) // if(!(pmove->cmd.buttons & IN_DUCK)) //&& ((pmove->onground != -1) || (pmove->numtouch > 0)))
// :tankefugl // :tankefugl
{ {
@ -1430,6 +1430,7 @@ void NS_UpdateWallsticking()
vec3_t theMinPoint; vec3_t theMinPoint;
vec3_t theMaxPoint; vec3_t theMaxPoint;
// TODO: SCALE BY FPS DEPENDANCY
VectorScale(kWallstickingDistanceCheck, -1, theMinPoint); VectorScale(kWallstickingDistanceCheck, -1, theMinPoint);
VectorCopy(kWallstickingDistanceCheck, theMaxPoint); VectorCopy(kWallstickingDistanceCheck, theMaxPoint);
@ -1464,10 +1465,10 @@ void NS_UpdateWallsticking()
// tankefugl: 0000972 // tankefugl: 0000972
if (/*theSurfaceNormal[2] < 0.95 && */ pmove->waterjumptime == 0) if (/*theSurfaceNormal[2] < 0.95 && */ pmove->waterjumptime == 0)
{ {
float dotNormalView = DotProduct(pmove->forward, theSurfaceNormal); //float dotNormalView = DotProduct(pmove->forward, theSurfaceNormal);
vec3_t tempNormal = {0, 0, 0}; vec3_t tempNormal = {0, 0, 0};
bool checkedDownOffset = NS_CheckOffsetFromOrigin(0, 0, theMinPoint[2] * 2, tempNormal); bool checkedDownOffset = NS_CheckOffsetFromOrigin(0, 0, theMinPoint[2] * 2, tempNormal);
if (dotNormalView < 0.7 && (checkedDownOffset == false)) if (/*dotNormalView < 0.7 && */(checkedDownOffset == false))
{ {
VectorCopy(theSurfaceNormal, gSurfaceNormal); VectorCopy(theSurfaceNormal, gSurfaceNormal);
@ -5198,12 +5199,19 @@ 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 (GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && (pmove->cmd.buttons & IN_JUMP) && !(pmove->oldbuttons & IN_JUMP) && (gSurfaceNormal[2] < 0.3))
{ {
vec3_t theJumpVect; vec3_t theDirectionVec;
VectorScale(pmove->forward, pmove->maxspeed, pmove->velocity); VectorCopy(pmove->velocity, theDirectionVec);
if (Length(theDirectionVec) == 0.0f)
VectorCopy(pmove->forward, theDirectionVec);
VectorNormalize(theDirectionVec);
VectorScale(theDirectionVec, pmove->maxspeed + 50, pmove->velocity);
pmove->velocity[2] += 100; pmove->velocity[2] += 100;
VectorScale(gSurfaceNormal, 50, theJumpVect); //vec3_t theJumpVect;
VectorAdd(theJumpVect, pmove->velocity, pmove->velocity); //VectorScale(gSurfaceNormal, 50, theJumpVect);
//VectorAdd(theJumpVect, pmove->velocity, pmove->velocity);
PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), 1.0 ); PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), 1.0 );