@@ -972,7 +972,10 @@ int PM_FlyMove( void )
972972
973973 // modify original_velocity so it parallels all of the clip planes
974974 //
975- if ( pmove -> movetype == MOVETYPE_WALK && ( ( pmove -> onground == -1 ) || ( pmove -> friction != 1 ) ) ) // relfect player velocity
975+ // reflect player velocity
976+ // Only give this a try for first impact plane because you can get yourself stuck in an acute corner by jumping in place
977+ // and pressing forward and nobody was really using this bounce/reflection feature anyway...
978+ if ( numplanes == 1 && pmove -> movetype == MOVETYPE_WALK && ( ( pmove -> onground == -1 ) || ( pmove -> friction != 1 )))
976979 {
977980 for ( i = 0 ; i < numplanes ; i ++ )
978981 {
@@ -2886,6 +2889,15 @@ void PM_CheckParamters( void )
28862889 pmove -> maxspeed = min ( maxspeed , pmove -> maxspeed );
28872890 }
28882891
2892+ // Slow down, I'm pulling it! (a box maybe) but only when I'm standing on ground
2893+ //
2894+ // JoshA: Moved this to CheckParamters rather than working on the velocity,
2895+ // as otherwise it affects every integration step incorrectly.
2896+ if ( ( pmove -> onground != -1 ) && ( pmove -> cmd .buttons & IN_USE ))
2897+ {
2898+ pmove -> maxspeed *= 1.0f / 3.0f ;
2899+ }
2900+
28892901 if ( ( spd != 0.0f ) && ( spd > pmove -> maxspeed ) )
28902902 {
28912903 float fRatio = pmove -> maxspeed / spd ;
@@ -3006,7 +3018,11 @@ void PM_PlayerMove( qboolean server )
30063018 {
30073019 if ( PM_CheckStuck () )
30083020 {
3009- return ; // Can't move, we're stuck
3021+ // Let the user try to duck to get unstuck
3022+ PM_Duck ();
3023+
3024+ if ( PM_CheckStuck () )
3025+ return ; // Can't move, we're stuck
30103026 }
30113027 }
30123028
@@ -3052,12 +3068,6 @@ void PM_PlayerMove( qboolean server )
30523068 }
30533069 }
30543070
3055- // Slow down, I'm pulling it! (a box maybe) but only when I'm standing on ground
3056- if ( ( pmove -> onground != -1 ) && ( pmove -> cmd .buttons & IN_USE ) )
3057- {
3058- VectorScale ( pmove -> velocity , 0.3 , pmove -> velocity );
3059- }
3060-
30613071 // Handle movement
30623072 switch ( pmove -> movetype )
30633073 {
0 commit comments