> Some of our users have reported that when you run along a wall and hold the
> Move Left or Right button so that you push into the wall, you run much
> quicker.  I tested this by adding the following code to
> CBasePlayer::ItemPostFrame() to output the velocity of the player.
>
> ALERT(at_console, "Ground speed %f\n", Vector(pev->velocity).Length());
>
> Our max player speed is set at 250.  Running normally I see numbers like
> this.  When running along a wall and pressing into it, the number jumps to
> 360.  I double checked this by timing myself running across a large
> room.  Normally it takes 9 seconds, but by taking advantage of this bug I
> can run across in 6 seconds.
>
> I am pretty sure this is a bug in the SDK or the engine as we have not
> modified any of this code and I have experienced this in other mods.  Is
> this a known bug?  If so, is there a fix for it?

In pm_shared.c, PM_WalkMove() calls PM_FlyMove().  PM_FlyMove() calls
PM_ClipVelocity() when the player's velocity will intersect a plane (like
walls, floors, etc.).  PM_ClipVelocity() takes in the original velocity (as the
first argument) and passes back a new velocity (as the third argument).  This
new velocity is an adjustment to "bounce" the player off of the wall.

The bounce adjustment seems to come from pmove->movevars->bounce.  The
movevars_s structure is defined in pm_movevars.h, but I can find no where that
this "bounce" field in pm_movevars is initialized.

Perhaps clamping the player's velocity immediately after the calls to
PM_ClipVelocity() will prevent this problem.

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to