Skip to content

Commit

Permalink
Clientside func_pushable fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Oct 28, 2024
1 parent 6f517c7 commit 5081561
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pm_shared/pm_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -2864,6 +2864,15 @@ void PM_CheckParamters( void )
pmove->maxspeed = min( maxspeed, pmove->maxspeed );
}

// Slow down, I'm pulling it! (a box maybe) but only when I'm standing on ground
//
// JoshA: Moved this to CheckParamters rather than working on the velocity,
// as otherwise it affects every integration step incorrectly.
if ((pmove->onground != -1) && (pmove->cmd.buttons & IN_USE))
{
pmove->maxspeed *= 1.0f / 3.0f;
}

if ( ( spd != 0.0 ) &&
( spd > pmove->maxspeed ) )
{
Expand Down Expand Up @@ -3036,14 +3045,6 @@ void PM_PlayerMove ( qboolean server )
}
}

#if !defined( _TFC )
// Slow down, I'm pulling it! (a box maybe) but only when I'm standing on ground
if ( ( pmove->onground != -1 ) && ( pmove->cmd.buttons & IN_USE) )
{
VectorScale( pmove->velocity, 0.3, pmove->velocity );
}
#endif

// Handle movement
switch ( pmove->movetype )
{
Expand Down

0 comments on commit 5081561

Please sign in to comment.