summaryrefslogtreecommitdiff
path: root/src/game/bg_pmove.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2001-01-04 08:38:28 +0000
committerTim Angus <tim@ngus.net>2001-01-04 08:38:28 +0000
commiteb4e4d240dab282addb4fda26ddf77a1d01f22cc (patch)
treeade26acba87efb786c100aea2d9b214623851c52 /src/game/bg_pmove.c
parentae51d659752ca314460b1e7f1bd4d4d58f2f7afc (diff)
added q_*.. d'oh
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r--src/game/bg_pmove.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 5d17b0be..a0c3c150 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -1486,10 +1486,19 @@ static void PM_GroundClimbTrace( void )
if( !VectorCompare( trace.plane.normal, refNormal ) && !VectorCompare( surfNormal, refNormal ) &&
!VectorCompare( trace.plane.normal, ceilingNormal ) && !VectorCompare( surfNormal, ceilingNormal ) )
{
+ int dAngle;
vectoangles( trace.plane.normal, toAngles );
vectoangles( surfNormal, surfAngles );
- pm->ps->delta_angles[1] -= ANGLE2SHORT( surfAngles[1] - toAngles[1] );
+ //pm->ps->delta_angles[ YAW ] -= ANGLE2SHORT( surfAngles[ YAW ] - toAngles[ YAW ] );
+ dAngle = ANGLE2SHORT( RAD2DEG( arccos( DotProduct( trace.plane.normal, surfNormal ) ) ) );
+ if( dAngle < 0 )
+ dAngle = -dAngle;
+
+ pm->ps->delta_angles[ YAW ] += dAngle;
+
+ Com_Printf( "%1.0f ", surfAngles[ YAW ] - toAngles[ YAW ] );
+ Com_Printf( "%1.0f\n", RAD2DEG( arccos( DotProduct( trace.plane.normal, surfNormal ) ) ) );
}
//transition from wall to ceiling
@@ -2501,8 +2510,8 @@ void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd ) {
//-abs( rotAngle ).. sorta
if( rotAngle > 0 )
- rotAngle -= rotAngle*2;
-
+ rotAngle = -rotAngle;
+
//hmmm could get away with only one rotation and some clever stuff later... but i'm lazy
RotatePointAroundVector( rotaxis[0], xNormal, axis[0], rotAngle );
RotatePointAroundVector( rotaxis[1], xNormal, axis[1], rotAngle );