3939
4040
4141ConVar tf_duck_debug_spew ( " tf_duck_debug_spew" , " 0" , FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY );
42- ConVar tf_showspeed ( " tf_showspeed" , " 0" , FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY );
42+ ConVar tf_showspeed ( " tf_showspeed" , " 0" , FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT );
4343ConVar tf_avoidteammates ( " tf_avoidteammates" , " 1" , FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY, " Controls how teammates interact when colliding.\n 0: Teammates block each other\n 1: Teammates pass through each other, but push each other away (default)" );
4444ConVar tf_avoidteammates_pushaway ( " tf_avoidteammates_pushaway" , " 1" , FCVAR_REPLICATED, " Whether or not teammates push each other away when occupying the same space" );
4545ConVar tf_solidobjects ( " tf_solidobjects" , " 1" , FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY );
@@ -317,6 +317,11 @@ void CTFGameMovement::ProcessMovement( CBasePlayer *pBasePlayer, CMoveData *pMov
317317 // Handle charging demomens
318318 ChargeMove ();
319319
320+ // Handle scouts that can move really fast with buffs
321+ HighMaxSpeedMove ();
322+
323+ CheckParameters ();
324+
320325 // Handle player stun.
321326 StunMove ();
322327
@@ -326,9 +331,6 @@ void CTFGameMovement::ProcessMovement( CBasePlayer *pBasePlayer, CMoveData *pMov
326331 // Handle grappling hook move
327332 GrapplingHookMove ();
328333
329- // Handle scouts that can move really fast with buffs
330- HighMaxSpeedMove ();
331-
332334 // Run the command.
333335 PlayerMove ();
334336
@@ -580,7 +582,7 @@ bool CTFGameMovement::StunMove()
580582 if ( m_pTFPlayer->m_Shared .GetStunFlags () & TF_STUN_MOVEMENT_FORWARD_ONLY )
581583 {
582584 mv->m_flForwardMove = 0 .f ;
583- }
585+ }
584586
585587 return true ;
586588 }
@@ -1757,7 +1759,7 @@ void CTFGameMovement::WalkMove( void )
17571759 // Copy movement amounts
17581760 float flForwardMove = mv->m_flForwardMove ;
17591761 float flSideMove = mv->m_flSideMove ;
1760-
1762+
17611763 // Find the direction,velocity in the x,y plane.
17621764 Vector vecWishDirection ( ( ( vecForward.x * flForwardMove ) + ( vecRight.x * flSideMove ) ),
17631765 ( ( vecForward.y * flForwardMove ) + ( vecRight.y * flSideMove ) ),
@@ -1881,7 +1883,8 @@ void CTFGameMovement::WalkMove( void )
18811883 {
18821884 // Made it to the destination (remove the base velocity).
18831885 mv->SetAbsOrigin ( trace.endpos );
1884- VectorSubtract ( mv->m_vecVelocity , player->GetBaseVelocity (), mv->m_vecVelocity );
1886+ Vector baseVelocity = player->GetBaseVelocity ();
1887+ VectorSubtract ( mv->m_vecVelocity , baseVelocity, mv->m_vecVelocity );
18851888
18861889 // Save the wish velocity.
18871890 mv->m_outWishVel += ( vecWishDirection * flWishSpeed );
@@ -1890,6 +1893,23 @@ void CTFGameMovement::WalkMove( void )
18901893 // NOTE YWB 7/5/07: Don't do this here, our version of CategorizePosition encompasses this test
18911894 // StayOnGround();
18921895
1896+ #if 1
1897+ // Debugging!!!
1898+ Vector vecTestVelocity = mv->m_vecVelocity ;
1899+ vecTestVelocity.z = 0 .0f ;
1900+ float flTestSpeed = VectorLength (vecTestVelocity);
1901+ if (tf_showspeed.GetInt () == 2 && baseVelocity.IsZero () && (flTestSpeed > ( mv->m_flMaxSpeed + 1 .0f )))
1902+ {
1903+ Msg (" Step Max Speed < %f\n " , flTestSpeed);
1904+ }
1905+
1906+ if (tf_showspeed.GetInt () == 2 )
1907+ {
1908+ Msg (" Speed=%f\n " , flTestSpeed);
1909+ }
1910+
1911+ #endif
1912+
18931913#ifdef CLIENT_DLL
18941914 // Track how far we moved (if we're a Scout or an Engineer carrying a building).
18951915 CTFPlayer* pTFPlayer = ToTFPlayer ( player );
@@ -1928,21 +1948,20 @@ void CTFGameMovement::WalkMove( void )
19281948 // NOTE YWB 7/5/07: Don't do this here, our version of CategorizePosition encompasses this test
19291949 // StayOnGround();
19301950
1931- #if 0
1951+ #if 1
19321952 // Debugging!!!
19331953 Vector vecTestVelocity = mv->m_vecVelocity ;
19341954 vecTestVelocity.z = 0 .0f ;
19351955 float flTestSpeed = VectorLength ( vecTestVelocity );
1936- if ( baseVelocity.IsZero() && ( flTestSpeed > ( mv->m_flMaxSpeed + 1.0f ) ) )
1956+ if ( tf_showspeed. GetInt () == 1 && baseVelocity.IsZero () && ( flTestSpeed > ( mv->m_flMaxSpeed + 1 .0f ) ) )
19371957 {
19381958 Msg ( " Step Max Speed < %f\n " , flTestSpeed );
19391959 }
19401960
1941- if ( tf_showspeed.GetBool() )
1961+ if ( tf_showspeed.GetInt () == 1 )
19421962 {
19431963 Msg ( " Speed=%f\n " , flTestSpeed );
19441964 }
1945-
19461965#endif
19471966}
19481967
0 commit comments