Skip to content

Commit

Permalink
Revert unneeded changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Jan 5, 2025
1 parent b41c1a2 commit 2eaaf12
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions pm_shared/pm_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -2293,15 +2293,6 @@ 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.0f ) && ( spd > pmove->maxspeed ) )
{
float fRatio = pmove->maxspeed / spd;
Expand Down Expand Up @@ -2422,11 +2413,7 @@ void PM_PlayerMove( qboolean server )
{
if( PM_CheckStuck() )
{
// Let the user try to duck to get unstuck
PM_Duck();

if( PM_CheckStuck() )
return; // Can't move, we're stuck
return; // Can't move, we're stuck
}
}

Expand Down Expand Up @@ -2457,6 +2444,12 @@ void PM_PlayerMove( qboolean server )
}
}

// 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 );
}

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

0 comments on commit 2eaaf12

Please sign in to comment.