summaryrefslogtreecommitdiff
path: root/src/game/bg_pmove.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r--src/game/bg_pmove.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 8bac27f5..3703cc86 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -1769,8 +1769,9 @@ static void PM_GroundClimbTrace( void )
if( rTtANGrTsTt > 32768 )
rTtANGrTsTt -= 32768;
- //set the correction angle
- if( traceCROSSsurf[ 2 ] <= 0.0f )
+ CrossProduct( refTOtrace, refTOsurfTOtrace, tempVec );
+ VectorNormalize( tempVec );
+ if( DotProduct( trace.plane.normal, tempVec ) > 0.0f )
rTtANGrTsTt = -rTtANGrTsTt;
//phew! - correct the angle