I tried running diagonally and it doesn't increase the speed by much.  I
will give Botman's suggestion a try though and see if it helps.

Rob Prouse
http://www.tourofdutymod.com

At 05:39 PM 16/05/2002 -0400, you wrote:
>When you run DIAGONALLY, do you exceed 250 as well?
>
>I've seen this before because the "max speed" is only across the AXIS.
>That is, if yoy have a max speed of 250, that means 250 across the "x"
>AND 250 across the "Y", which linearly is over 350 units.
>
>You can cap the movement velocity by using something akin to:
>
>int iVelocity = pev->velocity.Length2D();
>if (iVelocity > iMaxSpeed )
>{
>         pev->velocity.x = pev->velocity.x * iMaxSpeed / iVelocity;
>         pev->velocity.y = pev->velocity.y * iMaxSpeed / iVelocity;
>}
>
>...at least I *think* that's right.
>
>You'd have to do calculations such as this where you process the
>"cmd->forwardmove" and "cmd->sidemove" in the client code.
>
>This is all talking out of my ass; I don't have the code in front of me
>and haven't touched this part of it in ages.
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]] On Behalf Of Commando
>Sent: Thursday, May 16, 2002 4:36 PM
>To: [EMAIL PROTECTED]
>Subject: [hlcoders] Speed bug
>
>
>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?
>
>Rob Prouse
>http://www.tourofdutymod.com
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives,
>please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives,
>please visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders

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

Reply via email to