From 10a8b3897c2ed4d8828bfcaf47eb0b6ac2e1d9f4 Mon Sep 17 00:00:00 2001 From: puzl Date: Sun, 4 Jun 2006 09:44:23 +0000 Subject: [PATCH] o A new approach to fades and ladders. - The fade will never stick to a ladder when blink is active - The fade can only climb ladders when its vertical speed is low ( between -175 and 175) git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@520 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/pm_shared/pm_shared.cpp | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/releases/3.2.0/source/pm_shared/pm_shared.cpp b/releases/3.2.0/source/pm_shared/pm_shared.cpp index b6fd85c1..111b01b8 100644 --- a/releases/3.2.0/source/pm_shared/pm_shared.cpp +++ b/releases/3.2.0/source/pm_shared/pm_shared.cpp @@ -4849,12 +4849,13 @@ void PM_LadderMove( physent_t *pLadder ) if ( pmove->cmd.buttons & IN_MOVERIGHT ) right += MAX_CLIMB_SPEED; - if ( PM_GetIsBlinking() ) - { - pmove->movetype = MOVETYPE_WALK; - VectorScale( trace.plane.normal, 270, pmove->velocity ); - } - else if ( pmove->cmd.buttons & IN_JUMP ) +// if ( PM_GetIsBlinking() ) + //{ + //pmove->movetype = MOVETYPE_WALK; + //VectorScale( trace.plane.normal, 270, pmove->velocity ); + //} + //else + if ( pmove->cmd.buttons & IN_JUMP ) { pmove->movetype = MOVETYPE_WALK; VectorScale( trace.plane.normal, 270, pmove->velocity ); @@ -6502,14 +6503,20 @@ void PM_PlayerMove ( qboolean server ) bool theIsFlyingAlien = (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3) && (pmove->onground == -1); bool theIsSkulk = (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER1); - if ( !pmove->dead && !(pmove->flags & FL_ONTRAIN) && !gIsJetpacking[pmove->player_index] && !GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && !theIsFlyingAlien && !theIsSkulk) - { - pLadder = PM_Ladder(); - if ( pLadder ) - { - g_onladder[pmove->player_index] = 1; - } - } +// if ( PM_GetIsBlinking() ) { + if ( pmove->iuser3 == AVH_USER3_ALIEN_PLAYER4 && ( PM_GetIsBlinking() || pmove->velocity[2] > 175 || pmove->velocity[2] < -175 )) { + g_onladder[pmove->player_index] = 0; + } + else { + if ( !pmove->dead && !(pmove->flags & FL_ONTRAIN) && !gIsJetpacking[pmove->player_index] && !GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && !theIsFlyingAlien && !theIsSkulk) + { + pLadder = PM_Ladder(); + if ( pLadder ) + { + g_onladder[pmove->player_index] = 1; + } + } + } //pmove->Con_DPrintf("g_onladder: %d\n", g_onladder);