mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 15:21:54 +00:00
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:
parent
58c50b1399
commit
ff914175c0
1 changed files with 15 additions and 7 deletions
|
@ -1422,7 +1422,7 @@ void NS_UpdateWallsticking()
|
|||
if (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)))
|
||||
// :tankefugl
|
||||
{
|
||||
|
@ -1430,6 +1430,7 @@ void NS_UpdateWallsticking()
|
|||
vec3_t theMinPoint;
|
||||
vec3_t theMaxPoint;
|
||||
|
||||
// TODO: SCALE BY FPS DEPENDANCY
|
||||
VectorScale(kWallstickingDistanceCheck, -1, theMinPoint);
|
||||
VectorCopy(kWallstickingDistanceCheck, theMaxPoint);
|
||||
|
||||
|
@ -1464,10 +1465,10 @@ void NS_UpdateWallsticking()
|
|||
// tankefugl: 0000972
|
||||
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};
|
||||
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);
|
||||
|
||||
|
@ -5198,12 +5199,19 @@ 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))
|
||||
{
|
||||
vec3_t theJumpVect;
|
||||
VectorScale(pmove->forward, pmove->maxspeed, pmove->velocity);
|
||||
vec3_t theDirectionVec;
|
||||
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;
|
||||
|
||||
VectorScale(gSurfaceNormal, 50, theJumpVect);
|
||||
VectorAdd(theJumpVect, pmove->velocity, pmove->velocity);
|
||||
//vec3_t theJumpVect;
|
||||
//VectorScale(gSurfaceNormal, 50, theJumpVect);
|
||||
//VectorAdd(theJumpVect, pmove->velocity, pmove->velocity);
|
||||
|
||||
PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), 1.0 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue